Search
Configure Search
Th' theme offers three levels o' search through th' menu’s search form:
- In-page search: Highlights search terms on th' current plank
- Search popup: Opens a popup wit' results from other planks
- Dedicated search plank: Access'ble by click'n th' magnifier glass or press'n ENTER
Each level requires th' previous one t' be enabled. If no search be configured, th' search form won’t appear.
Opt'n All levels be enabled by default. Dis'ble them 'n hugo.toml
:
- In-page search:
disableSearch=true
- Search popup:
disableSearchIndex=true
- Dedicated search plank:
disableSearchPage=true
[params]
disableSearch = true
disableSearchIndex = true
disableSearchPage = true
params:
disableSearch: true
disableSearchIndex: true
disableSearchPage: true
{
"params": {
"disableSearch": true,
"disableSearchIndex": true,
"disableSearchPage": true
}
}
Opt'n Default URLs can be changed wit' th' follow'n parameter
- Search popup:
searchindex.js
set bysearchIndexURL
- Dedicated search plank:
search/index.html
set bysearchPageURL
[params]
searchIndexURL = 'omnisearchindex.js'
searchPageURL = 'omnisearch'
params:
searchIndexURL: omnisearchindex.js
searchPageURL: omnisearch
{
"params": {
"searchIndexURL": "omnisearchindex.js",
"searchPageURL": "omnisearch"
}
}
Only change these if ye have rrrambl'n at those URLs. This can happen wit' uglyURLs=true
'n hugo.toml
an' hav'n a rrrambl'n file at content/search.md
.
Check fer duplicate URLs by runn'n hugo --printPathWarn'ns
.
Supported Languages
Th' Lunr search library doesn’t support all languages o' th' theme. Unsupported languages will show errors 'n th' browser console. Currently unsupported be
- Czech
- Indonesian
- Polish
- Swahili
Mixed Language Support
Opt'n In case yer page’s rrrambl'n contains text 'n multiple languages (for example, ye be writ'n a Piratish documentat'n fer yer English API), ye can set those languages 'n additionalContentLanguage
t' broaden th' search.
[params]
additionalContentLanguage = ['en']
params:
additionalContentLanguage:
- en
{
"params": {
"additionalContentLanguage": [
"en"
]
}
}
Ye can add multiple languages t' this array.
Use th' base language code. For example, if yer plank be us'n zh-CN
, add zh
t' this parameter.