The One-Command Press

How a Breakdown gets published on this site: one command, one markdown file, and tests that refuse a hollow page.

By Ali AlQattan. How a Breakdown gets published on this site.

TL;DR

Publishing here is one command, one markdown file, and a push. Run node scripts/new-breakdown.mjs <slug>, write the article, run the tests and the build, push to main — the deploy carries it live. The registry tests refuse a hollow page: a missing file, route, or title goes red instead of publishing silence.

1. One command sets the press

Everything a Breakdown needs lives in four places, and the scaffolder writes all four. The markdown goes in src/sheets/articles/<slug>.md. The hero pair — a day cut and a night cut — is generated from the slug by scripts/figure-abstract.mjs, abstract linocut in the sheet's own ink: ray fan, broken-ring medallion, dash field, seeded so the set is unique and repeatable. The registry entry in src/sheets/articles.ts carries the title, dek, date, and tags. The crawler entry in services/seo.ts carries the route, title, and description.

Piece Where it lives Who writes it
Prose src/sheets/articles/<slug>.md You
Hero, day + night src/sheets/figure-<slug>(-night).svg The press
Index entry BREAKDOWN_META in src/sheets/articles.ts The press
Crawler entry PAGES in services/seo.ts The press

The command takes the slug plus the human parts: --title, --dek, --tags, and optionally --date (it defaults to today). Slugs are letters, digits, _ and -; anything else, or a slug the registry already names, dies loudly on the spot.

2. The markdown is the whole article

There is no editor and no database. The markdown file renders through the same ink-body print as every sheet: carved section heads, framed tables, ink code blocks, red links. Write around 2,000 words, prefer tables over long prose, link real sources.

Section figures are token lines, each on its own line with blank lines around it:

[[spot:chain]]

A token claims the prose that follows it, and the figure floats right of that section while the rest of the text takes the whole width. New articles start with no spots — the hero carries the page alone, which is exactly how this article ships. When a piece earns bespoke section figures, they get cut on request, registered with captions, and tokened into place. Unknown tokens never print: the build-time tests pin every token to a real file.

3. The tests refuse a hollow page

This is the part that makes it a press and not a folder of drafts. tests/breakdowns.test.ts asserts every registry entry ships its markdown, its night figure, and its spots; that every route answers with a 200; and that every article is advertised to crawlers with a matching title. The build itself inlines the rendered markdown into the static HTML, so a reader without JavaScript gets the article — and a PAGES entry without its markdown file fails the build instead of publishing an empty shell.

So the publishing loop is short and honest: write, npm test, npm run build, commit, push. Anything you forgot stops you before the public ever sees it. That is the entire CMS — a script that sets the type, and tests that refuse to print a blank sheet.