ReferenceComponentsEvergreenupdated 2026.083 min read
HubPart II · Wiki & browse
Part II · Wiki & browse

Wiki & browse

Everything in this chapter runs live on this site: the landing page's shelves are built of NoteCard, its facet rows are a FacetNav, the meta strip above this text is a TaxonomyLine, and the little constellation in the sidebar is a LocalGraph. All of them are pure display components — the site resolves its registry and passes display-ready data. The resolution helpers ship in the package as createTaxonomy and createBacklinks (mechanics in the package, meaning in the site).

§2.1The binding, three lines

src/lib/taxonomy.ts (this site's whole binding)
import { createTaxonomy } from 'astro-inkstone/lib/taxonomy';
import { DOMAINS, KINDS, STATUSES } from '../content/notes/_meta/taxonomy';

export const { getWikiUnits, groupByKind, groupByDomain, groupByPrimaryDomain, tagIndex, resolveTaxonomy } =
  createTaxonomy({ kinds: KINDS, domains: DOMAINS, statuses: STATUSES },
    { collection: 'notes', locales: [{ code: 'zh', prefix: 'zh/' }], primary: 'en' });

The registry (_meta/taxonomy.ts) is pure data in the content tree: kinds, domains with tone colors, statuses with dot colors, each with an English and a Chinese label. Add a value there, tag a note with it, and every browse page picks it up — the routes are value-parameterized.

§2.2The shelf and its tokens

Browse pages live on a second ground: browse.css gives them the warm paper, the serif masthead, the two-point shelf rule and the card grid, all through the --wb-* tokens — the browse half of the two-context palette. A page enters the context with one class, wb-root, on its body; inside it the chrome tokens are re-mapped so the same nav bar sits on either ground.

§2.3NoteCard

A card takes display-ready data — resolved labels, tones, a formatted date, mirror links. Cards live on the shelf, so the sample sits in a swatch of the browse context (.wb-root.wb-inset) inside this reading column:

  • Reference2026.08
    Kitchen sink

    Every element of the markdown pipeline performs once on this page.

  • Reference3 chapters2026.08
    The component set

    A three-chapter tour of every shipped component — and a live hub demonstration.

    ComponentsEvergreen

    Hero · HubCard · Stats — the hub furniture, on the hub itself

§2.4FacetNav

The multi-dimension browse index — kinds, domains (with their tones), top tags, all as prerendered pill links:

Label strings are props with English defaults — a Chinese site passes labels={{ kind: '形式', domain: '方向', tag: '标签', all: '全部 →' }} and nothing else changes.

§2.5TaxonomyLine, KindBadge, StatusDot, DomainChip

The one-line meta strip at a note's head assembles the three badge atoms; each is also usable alone:

PatternDesignGrowingupdated 2026.08

The atoms on their own, in a running line: a Guide kind badge, a Pipeline domain chip, a Evergreen status dot.

The "linked mentions" panel under every note in this garden is computed by the package's createBacklinks — the engine's own wikilink resolver inverted into a target ← sources index, context snippets included. Here with inline sample data:

Scroll to the foot of this page for the real one — this chapter is itself a wikilink target.

§2.7LocalGraph

The same index answers a second question — what is one hop away from here? — and index.localGraph(id, titleOf) returns it as a list of neighbours, inbound first. The component draws them on an ellipse around the note, inbound solid and outbound dashed; a neighbour may carry its own color (a second collection, say). Here at the column's width, with sample data; the real one sits in the sidebar of every note that has links:

Titles, sections and body text, in this language.
    ↑↓ · Enter · Escastro-inkstone