Files
khosra/examples/demo-site/content/pages/colophon.en.md
T
Claude Opus 5andbdeshi 67defae912 highlight code server-side, and let a block quote a file
chroma at render time, emitting CSS classes rather than inline colour, handed to
a `code` theme fragment. Highlighting works with scripting off, in a feed
reader, in a browser that never runs JavaScript. No lighter pure-Go option
exists — every "alternative to chroma" is JavaScript, which the reference theme
is gated against.

A fence's info string carries the rest: title, numbers, start, hl=3,7-9, and
file=name lines=A-B, which reads the snippet out of a file beside the bundle and
numbers it by that file's own lines. So a post quotes several parts of one
program without the copies drifting from it, and a reader can find what they are
looking at. Verified on the real binary: the same file at lines 5-10 and 12-14,
each numbered as it really is, with different lines tinted.

Not a new package: a new one could not import the key=value parser this repo
already has, because ADR-0069 forbids a feature importing its sibling, and a
second parser for the same syntax is what §6 stops.

Two costs, both stated in the ADR rather than buried. The binary goes from ~15MB
to 19MB, for a project whose story is one small binary. And the reference theme
now carries a token palette — the first thing in it that is a taste rather than
a demonstration — kept to eight classes for that reason.

The demo quotes a shell file, not a Go one: a .go file under examples/ joins the
module and has to compile, which the build gate caught before it shipped.

6 of 9 modules, ext 2188/3500.
2026-08-02 00:16:32 +06:00

1.3 KiB

title
title
Colophon

Built by khosra: one Go binary, four dependencies, no JavaScript anywhere in the reference theme.

The stylesheet is inlined into every page, so a site root with no static/ still renders. A real theme would replace it, and templates/list.html in this site root shows how — that one file overrides a single named block and inherits the rest of the document.

:tip: An icon is a name the engine hands to the theme; this reference theme answers with a character, while a theme of your own might answer with an SVG. A name it does not know, like :nosuchicon:, keeps its text.

:::details{group=run summary="Serve the demo" open=yes} make demo — this site, on localhost:8080. :::

:::details{group=run summary="Serve your own"} khosra -site /path/to/site. Grouped panels open one at a time, and nothing here runs a script. :::

A block may take its content from a file beside the bundle, so a post can quote several parts of one program without the copies drifting from it — each keeping the line numbers it really has:

:::tip{title="Nothing is hidden"} Panels are <details>, which every browser opens without help. A reader with scripting off sees the same page. :::