0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Interactive site keyword index with an A-Z jump strip, one filter box, term counts, display limits, and optional JSON data loading.
Overview
The <site-index> component enhances a static keyword index with an A-Z jump strip, one filter box, a term count per letter, and display limits with expand/collapse.
Without JavaScript, the static markup is a fully functional keyword index with CSS multi-column layout at wider viewports.
The index is hand-authored: you write the terms and their page references (or serve them as src JSON). Nothing is derived from page front matter or <meta name="concept"> tags; the site’s own keyword index is maintained by hand.
Jump nav mode: "entries" (only letters with entries), "all" (full A-Z strip, empty letters disabled), or "none" (hidden).
filter
string
"all"
What the filter box matches: "all" (terms and the titles of the pages they point to) or "topic" (terms only)
limit
number
—
Max topics per letter section before a "Show N more" toggle appears.
src
string
—
URL to load index data from as JSON
data-label-*
string
English
UI string overrides: controls, jump, terms and terms-one ({count} replaced), more ({count} replaced), less, matches, matches-one, no-matches
Features
A-Z Jump Navigation
By default, the jump nav shows only letters that have entries. Set letters="all" to show A–Z plus any other letters your sections use (id="index-é" adds É, sorted with the page language), with disabled states for empty ones. Letters come from the section ids, not a fixed alphabet. Scroll-spy highlights the current letter as the user scrolls, and hovering a letter shows how many terms it holds.
All letters mode
123
<site-indexletters="all"><!-- Full A-Z strip; letters without entries are disabled --></site-index>
Filter
One filter box sits above the index. It matches a term (.index-term) and the titles of the pages listed under it (.index-refs a), so “button” finds a topic with a “Button element” reference even when the word is not in the topic name. Set filter="topic" to match terms only.
While a filter is active every match shows (the display limit and its “Show N more” buttons step aside), a live status reports “N terms match” or “No matches”, and letters whose sections are filtered out become aria-disabled. Clearing the filter restores the display limit.
Term Counts
Each letter heading shows how many terms it holds (“4 terms”). The pages for a term are listed right under it, so terms carry no count of their own.
Display Limit
When limit is set, letter sections with more topics than the limit show a "Show N more" toggle button. Clicking expands to show all entries; clicking again collapses back.
Display limit
1234
<site-indexlimit="3"><!-- Sections with more than 3 topics show a "Show N more" button --></site-index>
HTML Structure
The static markup uses semantic HTML with specific classes that the component recognizes. The index is the <nav> that is a direct child of <site-index> and holds the letter sections (or any <nav data-index>), so its aria-label can be translated freely.
Section ID for jump nav anchors (lowercase letter; the letter shown in the strip comes from it)
nav[data-index]
Optional explicit marker for the index nav
JSON Data Loading
When src is set, the component fetches index data and renders dynamically. Static markup serves as fallback. Every string renders as text, and only http(s), relative and fragment hrefs become links (anything else, such as javascript:, renders as plain text).