Skip to content
duxt

DuxtSearch

Search every active source and interleave its locally ranked results.

The search field and its dialog, opened by the button or by ⌘/Ctrl+K.

Usage

<DuxtSearch />

API

No props. Built on useDuxtSearch().

Notes

Results span every active source. Content ranks each collection independently; those score spaces are not comparable, so duxt interleaves the per-collection lists by position, with the source being read first in each round. A term that appears in two repositories is therefore answered from both without pretending their scores form one global ranking. When nothing matches exactly, the list falls back to near-misses from useFuzzySearch() and says so — a typo should return the page, not an empty box.

Each result is one selectable row of three lines — its title, the context line the history above it carries, and a short excerpt of the section's own text, so a reader can judge a hit without opening it. Where a site has several sources, a subdued caption naming the source, the artefact and the version opens each run of results that share one — said once per run rather than repeated on every row, which is why those rows drop the source from their own line and keep the section and route that still tell them apart. The caption never reorders anything. Name a source with sources[].name to control what it says.

The reason duxt keeps the collection rankings separate, and the measured trade-off against a single Pagefind index, is recorded in ADR-0010.

Was this page helpful?