Fixture-driven docs
Five short essays, part 5 of 5.
A compiler test suite of the Svelte v2 era is commonly fixture-driven: one directory per case, holding real input and the expected output side by side, so a suite doubles as a library of concrete, runnable examples rather than only a pass/fail signal.
This site borrows that shape for documentation rather than tests.
Hello site,
Counterand
Todo listare each a complete
site.pythat actually builds with
arklight build site.py-- not a trimmed snippet assembled for prose.
- A claim about the component vocabulary is checked against arklight search <Name> before it's written down here, the same way a fixture's expected output is checked against a real compiler run rather than typed from memory.
- scripts/check_content.py catches a route with no matching content, or content for a route the manifest doesn't declare -- a smaller, site-specific echo of a fixture suite catching an input with no expected output beside it.
- Keeping examples buildable means they drift much less: a prose description of a counter can quietly go stale; a site.py that's actually built stops building the moment it does.
Full component, action and CLI vocabulary:
reference overview. Worked examples end to end:
tutorial.
