Search

Th' theme offers three levels o' search through th' menu’s search form:

  1. In-page search: Highlights search terms on th' current plank
  2. Search popup: Opens a popup wit' results from other planks
  3. 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
hugo.
[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 by searchIndexURL
  • Dedicated search plank: search/index.html set by searchPageURL
hugo.
[params]
  searchIndexURL = 'omnisearchindex.js'
  searchPageURL = 'omnisearch'
params:
  searchIndexURL: omnisearchindex.js
  searchPageURL: omnisearch
{
   "params": {
      "searchIndexURL": "omnisearchindex.js",
      "searchPageURL": "omnisearch"
   }
}
Avast

Ye only need t' change these if ye have other own rrrambl'n created fer 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
  • Persian
  • 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.

hugo.
[params]
  additionalContentLanguage = ['en']
params:
  additionalContentLanguage:
  - en
{
   "params": {
      "additionalContentLanguage": [
         "en"
      ]
   }
}

Ye can add multiple languages t' this array.

Avast

Use th' base language code. For example, if yer plank be us'n zh-CN, add zh t' this parameter.