Skip to content

Commit

Permalink
Add params to offlineSearch examples (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm authored Feb 2, 2024
1 parent a4eaf8f commit e3d83dc
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions userguide/content/en/docs/adding-content/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,18 @@ To add Lunr search to your Docsy site:
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params]
offlineSearch = true
{{< /tab >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
offlineSearch: true
params:
offlineSearch: true
{{< /tab >}}
{{< tab header="hugo.json" lang="json" >}}
{
"offlineSearch": true
"params": {
"offlineSearch": true
}
}
{{< /tab >}}
{{< /tabpane >}}
Expand All @@ -227,17 +231,21 @@ You can customize the summary length by setting `offlineSearchSummaryLength` in
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
#Enable offline search with Lunr.js
[params]
offlineSearch = true
offlineSearchSummaryLength = 200
{{< /tab >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
offlineSearch: true
offlineSearchSummaryLength: 200
params:
offlineSearch: true
offlineSearchSummaryLength: 200
{{< /tab >}}
{{< tab header="hugo.json" lang="json" >}}
{
"offlineSearch": true,
"offlineSearchSummaryLength": 200
"params": {
"offlineSearch": true,
"offlineSearchSummaryLength": 200
}
}
{{< /tab >}}
{{< /tabpane >}}
Expand All @@ -249,17 +257,21 @@ You can customize the maximum result count by setting `offlineSearchMaxResults`
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params]
offlineSearch = true
offlineSearchMaxResults = 25
{{< /tab >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
offlineSearch: true
offlineSearchMaxResults: 25
params:
offlineSearch: true
offlineSearchMaxResults: 25
{{< /tab >}}
{{< tab header="hugo.json" lang="json" >}}
{
"offlineSearch": true,
"offlineSearchMaxResults": 25
"params": {
"offlineSearch": true,
"offlineSearchMaxResults": 25
}
}
{{< /tab >}}
{{< /tabpane >}}
Expand Down

0 comments on commit e3d83dc

Please sign in to comment.