Built-in Search
Full-text search powered by a build-time index with fuzzy matching and keyboard navigation.
DocuBook Flame includes a built-in full-text search that works entirely client-side — no external services required. The search index is generated at build time and loaded on demand.
How It Works
- Build-time indexing — During
flame build, all MDX files are scanned and asearch-index.jsonis generated - Hierarchy-based records — Each page produces multiple records: title (lvl1), headings (lvl2–lvl6), and content paragraphs
- Client-side search — The index is fetched on first modal open and cached in memory
Features
- Fuzzy matching — Tolerates typos using Levenshtein distance
- Weighted scoring — Title matches rank higher than heading matches, which rank higher than content matches
- Grouped results — Results are grouped by section (lvl0) with appropriate icons per type
- Keyboard navigation — Full keyboard support:
⌘Kto open,↑↓to navigate,Enterto select,Escto close
Keyboard Shortcuts
Search Scope
The indexer extracts the following from each MDX file:
- lvl0 — Section name (from route configuration)
- lvl1 — Page title (from frontmatter)
- lvl2–lvl6 — Headings (h2 through h6)
- content — First paragraph after each heading
Configuration
Search works out of the box with no configuration. The index is automatically regenerated on every build.
To search with Algolia DocSearch instead, and add Ask AI, install the Algolia plugin. A search plugin replaces this dialog; the sidebar search bar and ⌘ K stay where they are.
Last updated Nov 6, 2026