Skip to Content
Comparison CriteriaSite Search (Local)

Site Search (Local)

Nextra 4 uses Pagefind  for fully client-side, zero-backend local search. No external search service, API key, or hosted index is required: Pagefind crawls the statically rendered HTML output and produces a static search index that ships alongside the site.

That index is generated by this project’s postbuild script, pagefind --site out --output-subdir _pagefind, which runs automatically after the Bun-powered Next.js build. Because the index is built from the static export rather than the dev server, search only works against a production build. From the repository root, mise run build && mise run serve exposes the working search box, while bun run dev shows no results because no index has been generated yet.

The search box lives in the navbar and is reachable from any page, with a keyboard shortcut (typically Cmd/Ctrl+K) for quick access.

Last updated on