Site Search (Local)
Starlight enables Pagefind by default. During
astro build, it indexes the generated static HTML and writes a search bundle
into dist/pagefind/. The header search UI loads that local index in the
browser; no hosted service, API key, or backend is required.
Search is production-build functionality. The development server intentionally
does not have a fresh Pagefind index, so use bun run build && bun run preview
to test results.
Page frontmatter can set pagefind: false, and elements marked with
data-pagefind-ignore are excluded from the index.