Skip to main content

Plugin options

Options for docusaurus-plugin-docsense.

Top-level options​

OptionTypeDefaultDescription
docsDirsstring[]['docs']Folders to scan, relative to the site root
docsRouteBasePathstring'/docs'URL prefix used when building result links
indexPathstring'docsense/search-index.json'Output path under static/
defaultVersionstring'current'Default version facet on documents
defaultLanguagestring'en'Default language facet on documents
resultLimitnumber8Initial page count in the modal
searchBarobjectsee belowLabels and modal behavior

searchBar options​

OptionTypeDefaultDescription
placeholderstring'Search docs…'Modal input placeholder
triggerLabelstring'Search'Navbar button label
shortcutstring'mod+k'Keyboard shortcut
showShortcutHintbooleantrueShow shortcut on the trigger
modalAriaLabelstring'Search docs'aria-label for the modal
emptyResultsLabelstring'No results'Empty-state message
debounceMsnumber120Query debounce in milliseconds

Example​

[
'docusaurus-plugin-docsense',
{
docsDirs: ['docs'],
docsRouteBasePath: '/docs',
indexPath: 'docsense/search-index.json',
defaultVersion: 'current',
defaultLanguage: 'en',
resultLimit: 8,
searchBar: {
placeholder: 'Search the docs…',
triggerLabel: 'Search docs',
shortcut: 'mod+k',
showShortcutHint: true,
modalAriaLabel: 'Search docs',
emptyResultsLabel: 'No results',
debounceMs: 120,
},
},
]

themeConfig.docsense​

Optional overrides for the SearchBar at theme level:

themeConfig: {
docsense: {
resultLimit: 8,
searchBar: {
placeholder: 'Find guides…',
triggerLabel: 'Search docs',
},
},
}

Frontmatter fields Docsense reads​

FieldEffect
title / sidebar_labelDocument title
pageTypeFilter chip category
versionVersion facet
languageLanguage facet
productProduct facet
tags / keywordsExtra searchable tags

Next steps​