Data explorer
Search, filter, and sort a collection in the browser, with a search page fallback.
A data explorer turns a collection's records into a table the reader can search, filter, and sort without a server. The engine writes the collection's index at build time; the island reads it on the query field's first focus, so a page no one searches costs no download.
Syntax
::data-explorer{from=books columns=title,pages,published filters=format sort=title,pages}
Options
| Name | Type | Default | What it does |
|---|---|---|---|
from |
string | none | The collection to read, as the site config names it. A missing collection shows the same note as the record table. |
columns |
string | none | The fields the table shows, in order, as title,pages or a JSON array with field, label, and kind. |
filters |
string | none | The fields the island offers as checkboxes, such as format,year. A field with fewer than two values is skipped. |
sort |
string | none | The fields the island offers as sort choices, such as title,pages. Relevance comes first. |
Every column and sort field must exist in the collection. The table shows the first 50 records before the island runs, and the button the island reveals continues past them.
Each chosen filter appears as a chip beside the filters. Removing a chip unchecks its filter, moves focus to that filter's checkbox instead of losing it, and announces the new result count once. The count follows the page language's plural rules, and its digits are the page language's own: Persian and Arabic pages show Persian and Arabic numerals.