Configurations

List of available site parameters and page parameters for the Hugo search module.

Site Parameters§

hugo.yaml

1params:
2  search:
3    stall_threshold: 200
yaml

hugo.toml

1[params]
2  [params.search]
3    stall_threshold = 200
toml

hugo.json

1{
2   "params": {
3      "search": {
4         "stall_threshold": 200
5      }
6   }
7}
json

case_sensitive§

Indicates whether comparisons should be case sensitive.

NameTypeDefaultRequired
case_sensitivebooleanfalse-

distance§

Determines how close the match must be to the fuzzy location (specified by location). An exact letter match which is distance characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified. A distance of 1000 would require a perfect match to be within 800 characters of the location to be found using a threshold of 0.8.

NameTypeDefaultRequired
distancenumber100-

expand_results_meta§

When true, expand the results meta by default.

NameTypeDefaultRequired
expand_results_metabooleanfalse-

filter_taxonomies§

Whether to enable the taxonomies filter.

NameTypeDefaultRequired
filter_taxonomiesbooleantrue-

filter_years§

Whether to enable the years filter.

NameTypeDefaultRequired
filter_yearsbooleantrue-

ignore_location§

When true, search will ignore location and distance, so it won't matter where in the string the pattern appears.

NameTypeDefaultRequired
ignore_locationbooleanfalse-

index_all_pages§

When true, all pages except noindex pages will be indexed, include non-regular pages, such as home and taxonomy lists.

NameTypeDefaultRequired
index_all_pagesbooleantrue-

index_content§

When true, the engine will also search by content, you may need to tweak the distance parameter as well. Please note that, it may become a performance killer on a large site.

NameTypeDefaultRequired
index_contentbooleanfalse-

lazy_loading§

Lazy loading the indices.

NameTypeDefaultRequired
lazy_loadingbooleantrue-

location§

Determines approximately where in the text is the pattern expected to be found.

NameTypeDefaultRequired
locationnumber0-

max_results§

Denotes the max number of returned search results.

NameTypeDefaultRequired
max_resultsnumber100-

min_match_char_length§

Only the matches whose length exceeds this value will be returned. (For instance, if you want to ignore single character matches in the result, set it to 2).

NameTypeDefaultRequired
min_match_char_lengthnumber1-

The container for the search modal. It should be a valid CSS selector. Leave it empty if you're using single search page mode only.

NameTypeDefaultRequired
modal_containerstringbody-

The search modal toggle selector.

NameTypeDefaultRequired
modal_toggle_selectorstring.search-modal-toggle-

paginate§

How many results per page, at least 20, for making sure the load more event will be able to trigger.

NameTypeDefaultRequired
paginatenumber20-

shortcut_close§

Shortcuts to close the search modal. Empty array means disabled. See key values for keyboard events.

NameTypeDefaultRequired
shortcut_closearray[Escape]-

Shortcuts to open the search modal. Leave it empty to disable.

NameTypeDefaultRequired
shortcut_searcharray[Control k]-

stall_threshold§

How many milliseconds must elapse before considering the autocomplete experience stalled.

NameTypeDefaultRequired
stall_thresholdnumber300-

threshold§

At what point does the match algorithm give up. A threshold of 0.0 requires a perfect match (of both letters and location), a threshold of 1.0 would match anything.

NameTypeDefaultRequired
thresholdnumber0.6-

Page Parameters§

AKA front matter.

noindex§

When true, the page won't be indexed, that is, it won't appear on the search results.

NameTypeDefaultRequired
noindexbooleanfalse-
  • All
  • English
  • 简体中文
  • Best match
  • Oldest
  • Newest
  • 2023
  • 2024
  • Hugo Modules Authors
  • OpenModels
  • Razon Yang
  • Bootstrap
  • Comment Engine
  • Content
  • Deployment
  • Docker Images
  • Go
  • HTML
  • Hugo
  • Icons
  • Images
  • Mermaid
  • Module
  • Modules
  • PWA
  • Search
  • SEO
  • Shortcode
  • Shortcodes
  • Toggle
  • 搜索
  • Docker
  • Docs
  • Hugo
  • Module
  • Modules
  • News
  • Shortcode
  • Tutorials
  • 教程
  • 模块
  • Abbr
  • Abbreviations
  • Accordion
  • Alert
  • Alternatives
  • Analytics
  • Animation
  • AOS
  • Articles
  • Asciinema
  • AutoPrefixer
  • BaseURL
  • Bilibili
  • Bootstrap
  • Bootstrap Icons
  • Brightness
  • Button
  • Card
  • Clearfix
  • Code
  • Code Block
  • Code Editor
  • CodePen
  • Col
  • Collapse
  • ColorBalance
  • Colorize
  • Config
  • Container
  • Contrast
  • Crop
  • CSS
  • CSS Variables
  • Debug
  • Deployment
  • Development
  • Diagrams
  • DigitalOcean
  • Digitalocean App Platform
  • Display
  • Docker
  • Docker Hub
  • Docsy
  • EmGitHub
  • Encrypt
  • Environment Variables
  • Favicons
  • Feather Icons
  • Features
  • Fill
  • Fit
  • Flowchart
  • Font Awesome Icons
  • Gamma
  • GaussianBlur
  • Giscus
  • GitHub
  • GitHub Container Registry
  • Google AdSense
  • Google Analytics
  • Grayscale
  • Grid
  • HTML
  • Hue
  • HugoPress
  • I18n
  • Icon Grid
  • Image
  • Internationalization
  • Invert
  • JavaScript
  • JS
  • JSFiddle
  • JSON
  • JSRun
  • KaTeX
  • Lead
  • Link
  • Material Design Icons
  • Math
  • Mergify
  • Microsoft Clarity
  • Modal
  • Music
  • NetEase Cloud Music
  • Offline
  • Open Graph
  • Parameters
  • Pixelate
  • Plausible Analytics
  • PostCSS
  • Proxy
  • Ratio
  • Renovate
  • Requirements
  • Resize
  • Row
  • RTLCSS
  • Saturation
  • Schema
  • Scroll
  • Search
  • Sepia
  • Service Worker
  • Sigmoid
  • Simple Icons
  • Single Page
  • Snackbar
  • Tabler Icons
  • Terminal
  • Toggle
  • TOML
  • Translations
  • Twikoo
  • Twitter Cards
  • UnsharpMask
  • Utterances
  • Video
  • Video.js
  • YAML
  • YouKu
  • CSS 变量
  • i18n
  • 代理服务器
  • 单页
  • 参数
  • 国际化
  • 模态框