Skip to content

Commit efe1120

Browse files
svrnmchalin
authored andcommitted
Add params to offlineSearch examples
While trying out the offline search feature I struggled to get it working until I figured out that the `offlineSearch` should be within `params`.
1 parent a4eaf8f commit efe1120

File tree

1 file changed

+7
-3
lines changed
  • userguide/content/en/docs/adding-content

1 file changed

+7
-3
lines changed

userguide/content/en/docs/adding-content/search.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,23 @@ To add Lunr search to your Docsy site:
199199
{{< tabpane >}}
200200
{{< tab header="Configuration file:" disabled=true />}}
201201
{{< tab header="hugo.toml" lang="toml" >}}
202+
[params]
202203
offlineSearch = true
203204
{{< /tab >}}
204205
{{< tab header="hugo.yaml" lang="yaml" >}}
205-
offlineSearch: true
206+
params:
207+
offlineSearch: true
206208
{{< /tab >}}
207209
{{< tab header="hugo.json" lang="json" >}}
208210
{
209-
"offlineSearch": true
211+
"params": {
212+
"offlineSearch": true
213+
}
210214
}
211215
{{< /tab >}}
212216
{{< /tabpane >}}
213217

214-
2. Remove or comment out any GCSE ID in `hugo.toml`/`hugo.yaml`/`hugo.json` and ensure Algolia DocSearch is set to `false`, as you can only have one type of search enabled. See [Disabling GCSE search](#disabling-gcse-search).
218+
3. Remove or comment out any GCSE ID in `hugo.toml`/`hugo.yaml`/`hugo.json` and ensure Algolia DocSearch is set to `false`, as you can only have one type of search enabled. See [Disabling GCSE search](#disabling-gcse-search).
215219

216220
Once you've completed these steps, local search is enabled for your site and results appear in a drop down when you use the search box.
217221

0 commit comments

Comments
 (0)