Search
Every writedocs build indexes the site automatically, using Pagefind — a static search engine that runs entirely client-side, with no external service, API key, or ongoing cost.
There’s no writedocs.json field for this — search is on by default for every site. If you can build your site, you have search.
What gets indexed
Every page’s rendered content is indexed, with the page title weighted as the primary match signal. Sidebar and topbar chrome (navigation links, the theme toggle, etc.) is excluded from the index, so results only ever surface actual content.
How it works
The index is built as a post-processing step after Astro finishes rendering — Pagefind scans the compiled dist/ HTML directly, rather than plugging into the build pipeline itself. This is why a successful build’s last lines look like:
[writedocs] Indexing search...
[writedocs] Done. Output written to <dir>/distThe index (dist/pagefind/) is a handful of static files alongside your site — it deploys with everything else, no separate infrastructure to run.