Reference
Adding to the codex
How to write a new page or a new journey, and how the codex checks your work.
Every page is a plain Markdown file in content/pages/. Every journey is a TOML file in content/journeys/. Restart the server, or run it with --dev so it rereads the folder on each request.
A new page
Create content/pages/your-page.md. The file name becomes the address.
+++
title = "Horses"
category = "Survival"
summary = "One sentence a reader sees under the title and in search."
tags = ["horse", "ride", "mount"]
sources = ["src/systems/horses.js"]
order = 3
+++
## Buying a horse
Write normally. Link to another page with [[controls]]
or with your own words: [[controls|the keys]].
Link to a section: [[controls#combat|combat keys]].
The category must be one of those listed in content/site.toml.
Extras
| Write | Get |
|---|---|
> [!TIP] | A tip box. Also [!NOTE], [!IMPORTANT], [!WARNING], [!CAUTION] |
{{keybinds}} | The full key table, with the layout picker |
{{advantages}} / {{disadvantages}} | The price tables |
{{food}} | The food table |
{{journeys}} | Cards for every journey |
| `[[tool:class | text]]` |
| `[[db:items/113 |
A new journey
Copy content/journeys/archer-thief.toml and change it. A journey is a class build with notes. Its [build] block is the class; build_notes explain the choices; and the stages and steps are kept only as a reference list: the guides a step points to with see = ["slug", "slug#section"], and the tools it names, become the journey’s “Guides for this build” and “Calculators” lists. The steps themselves are not shown. The optional [build] block is a custom class that appears as a class sheet and as a preset in the calculator.
Databases
Databases are JSON files in content/data/, produced by node tools/extract.mjs from the game’s own source (and, for spells, classes, factions and magic items, from local game files). Do not edit them by hand: change the extractor and run it again. Add local = true to a page’s header, or to a journey, if it links a local database, so export --no-local leaves it out.
Checking your work
cargo run -- check
This fails if any link points nowhere, any category is unknown, any step id repeats, or any build breaks the game’s own class rules (attributes not adding to 400, illegal advantage pairs, difficulty out of range). cargo test runs the same checks.
Keeping facts honest
Pages list the game source files they were checked against, under sources. When the game updates, change source_commit in site.toml and recheck the pages that cite changed files.
Category: Reference