Search and AI
Search#
Customize the input placeholder and shortcut with search.prompt, search.shortcut, and search.shortcutLabel. Set shortcut to false to disable only the shortcut, or set search to false to remove search entirely:
{
"search": {
"prompt": "Search the docs...",
"shortcut": "k",
"shortcutLabel": "Ctrl K"
}
}Search providers#
The built-in local provider is used by default. Select a registered provider with search.provider; options are passed directly to its factory:
{
"search": {
"provider": "hosted",
"options": { "index": "docs" }
}
}Provider options are included in the browser bundle, so do not put private API keys in them. An unknown provider id logs a warning and falls back to local.
Markdown export#
The production build publishes the raw markdown of every page next to its HTML: /docs/installation is the rendered page, /docs/installation.md is the markdown source. This powers the contextual menu below and gives AI tools a clean, token-efficient version of every page.
Contextual menu#
The contextual key adds a menu beside the page title for AI-optimized actions. The first option is the primary button; the rest go in a dropdown.
{
"contextual": {
"options": ["copy", "view", "chatgpt", "claude", "perplexity"]
}
}copy— copy the page as Markdown to the clipboardview— open the page's markdown source in a new tabchatgpt,claude,perplexity— open the assistant with a prompt pointing at the page's markdown URL (requires the site URL to be configured)
Custom options#
Define your own entries as objects. $path expands to the page path and $page to the page's markdown URL:
{
"contextual": {
"options": [
"copy",
{
"title": "Ask support",
"description": "Send this page to the support bot",
"icon": "life-buoy",
"href": "https://example.com/ask?page=$path",
"target": "_blank"
}
]
}
}Back to Configuration overview.