Site Search
Built sites include a working search page at /search/ — generated per language at build time, backed by a static JSON index, and searched entirely in the visitor’s browser. This page covers how it works and how it stays current.
How it works
- The builder writes a search index —
<language>/search-index.json— containing every published page and post in that language: the entry type, title, absolute URL, and an excerpt (the author’s excerpt when supplied; otherwise a 160-character summary generated from the body). - The search page (rendered from
search.tt, with your theme’s header and footer) loads that index client-side and matches the visitor’sq=query locally — no server round-trip, no search backend, nothing to configure.
What’s searchable
- Published pages and posts, per language. Each index entry carries the title, result URL, and excerpt — so what matches is exactly what a visitor reads in the listing.
- Indexes are scoped by language: a search under a language’s
/search/never surfaces results in another language (consistent with the per-language output model). - Excerpts come from the author’s own excerpt field when set, else the auto-generated summary — the same text used in listings and feeds, so search previews match what a click-through shows.
Always current
The index is regenerated on every build — incremental builds too — so the search results reflect exactly the content that was last promoted. Publish, rebuild, and search sees it.
Utility-page details
/search/pages are marked noindex by the builder, so they never appear in sitemaps or crawler listings.- The service worker (PWA) also pre-caches the search page per language, so search renders from cache offline — matching queries against the bundled index.
- The header’s search form targets the same
/search/URL with aq=parameter, in every language vhost.
CMS-side searches (a related but separate system)
The admin area has its own search surfaces — the Library’s block search, the documents listing search, and the API’s /api/search endpoint for scripts — but those search the database and are administered. The public search page is the built one described here.