Documentation/Docs/Search
1 min read

Search

As the docs grow, search becomes essential. Here’s the recommended path.

Phase 1: basic navigation + TOC (current)

  • auto-generated sidebar from MDX frontmatter
  • “On this page” TOC per document

Phase 2: static local search index

Generate a small JSON index at build time:

  • title, description, headings, and URL
  • optionally a short excerpt per section

Then implement a client-side search UI that filters the local index.

Pros:

  • fully static (great for SEO)
  • no external services

Cons:

  • limited ranking unless you invest in scoring

Phase 3: hosted search (Algolia/DocSearch)

For bigger docs:

  • better ranking and typo tolerance
  • analytics (what users search for)

Next steps

If you want, I can implement Phase 2 next: build-time index generation + a search modal with keyboard shortcuts.