The catalog
Every cheatsheet is a folder holding a sheet.json,
at <category>/<sheet>/ or
<category>/<group>/<sheet>/, with the human
readable titles in a meta.json at each level.
node tools/build-manifest.mjs walks that tree and writes
cheatsheets.json,
which is committed rather than built when the site deploys, so a local
php -S localhost:8000 needs no Node. Regenerate and commit it
whenever a cheatsheet is added, renamed or moved.
The same walk, as a gate
node tools/build-manifest.mjs --check
It fails a missing title, a path that is not lower case kebab, a
kind that disagrees with what is in the folder, a sheet whose
composition will not fit its own margins, and a cheatsheets.json
that has gone stale. The Pages workflow runs it before it publishes, which is
where a casing mismatch is caught - those resolve on Windows and 404 on the
published site.
Part of the cheatsheets documentation. The repository is on GitHub, and the example page it documents is here.