andweg.dev

Uczta dla Wron

The rulebook for a play-by-Discord game set in the world of A Song of Ice and Fire. A friend runs the game and writes the rules; I made the site they live on.

He writes them as Obsidian notes and the site rebuilds itself from those. Most of the actual work went into making Polish behave.

The Uczta dla Wron rules reference

He writes the rules, not websites. So the content is just a folder of markdown files he edits in Obsidian (which he was using anyway). Save, push, site rebuilds. One thing kept getting in the way though: the rules lean heavily on inline icons, a single formula can have four of them, and Obsidian’s syntax for those is long enough to make a table row unreadable. Now he types :zloto:, the same shortcode he’d use on Discord, and a plugin expands it. 110 pages so far and counting.

Quartz wasn’t really expecting Polish. Page URLs kept their diacritics, so Pobór wojska turned into a row of percent signs the moment someone pasted the link into Discord (which is where the players actually are). Search didn’t fold accents either, so typing pobor found nothing. Sorting put Ł and Ó in odd places. None of this was configurable, Quartz spreads that behaviour across fifty-odd packages and hardcodes it, so I have a script that rewrites those packages after every install. It fails the build when one of its patches stops matching, and I’d much rather have that than a site that quietly starts serving broken links. One letter needed special treatment: you can strip Polish accents mechanically, except for ł, which Unicode considers a letter of its own rather than an l with a stroke on it.

Three things I got sick of checking by hand. One script measures every colour pair in the theme against the WCAG thresholds (body text lands at 13.28:1, links at 6.72:1). Another runs the Polish URL, plural and date helpers against a set of known cases. A third reads the notes themselves and looks for tables whose rows don’t line up, or pages with no description. And the layout has to hold up at 375px, since most people read this on a phone, inside Discord’s built-in browser of all things.

There are two palettes: Archiwum Cytadeli, which is supposed to look like a maester’s parchment archive, and a darker one for reading at night. Rubricated headings, drop caps, margin notes, the works. The masthead replaces Quartz’s sidebar via CSS grid without touching the markup underneath.

The rules are VegetaZen’s. Everything else is mine.

Stack
Quartz v5, TypeScript, Preact, SCSS, Custom Quartz plugins, Obsidian, Cloudflare Pages
Links

Back to all projects