← Docs · Stoa
Search and filters
Stoa gives a static site two ways to find things without a server: the Command Bar searches the whole site from an index written at build time, and the Filter Bar narrows the items already on a page. Both work from the keyboard and keep what you typed where you can share it.
Command Bar and shortcuts
The Command Bar opens with Ctrl+K or ⌘K, or with / when you are not typing, and searches an index the build writes beside the pages. Results are grouped by kind, each with its badge, and an empty query offers the kinds the site chooses. Press ? for the shortcuts: one registry holds every shortcut the page has, and the help dialog lists exactly those.
The index is built and checked at build time by the Search Index Contract, from entries the site supplies. A site served from a folder rather than a host's root, like the workbench here, gives the Command Bar that folder as its base, and the index and every result resolve against it.
Filter Bar
The Filter Bar filters the rows a build already wrote. Each row carries its fields as data-f-<field> attributes; the reader types field:value pills and free words, or picks a quick filter, and rows that do not match are hidden. The query is kept in the address as ?q=, so a filtered view is a link.
Field values match whole values, case-insensitively, and free words match anywhere in a row's text. A site can filter without the bar's interface too, with the same query parser and matcher.