README.md

lvdar.nl — content #

The posts and pages behind lvdar.nl, written in Typst.

This repository holds only content. The site that serves it lives at lvdar.nl/site.

Publishing is a push #

The server polls this repository and recompiles when the revision changes. A push is live within one poll interval (60 s by default) — there is no rebuild, no redeploy and no restart. Nothing here goes through flake-bump, build-gate or comin.

That is the point, and it is also the risk: nothing between git push and the live site checks this content. The compile that used to happen at build time now happens in the running server, which skips a post it cannot compile rather than failing. A broken post would simply vanish from the site.

The pre-commit hook is what replaces that check, so please let it run.

Layout #

lib/post.typ           the template every file applies
posts/YYYY-MM-DD-slug.typ
pages/about.typ        standalone pages

The date prefix orders the directory and is stripped from the URL: posts/2026-08-27-hello.typ is served at /blog/hello.

Writing a post #

#import "../lib/post.typ": post
#show: post.with(
  title: "A title",
  date: datetime(year: 2026, month: 8, day: 27),
  tags: ("nix", "rust"),
  summary: "One or two sentences, shown in listings and in the feed.",
)

Body text. Equations like $e^(i pi) + 1 = 0$ become MathML — real, selectable,
indexable text rather than a picture of an equation.

draft: true keeps a post off the live site entirely.

Checking your work #

nix develop        # or `direnv allow`
content-check .    # compile everything, report what is broken

content-check is the same code the server loads content with, taken straight from the site's flake. It is not an approximation: it enforces the rules a bare typst compile cannot see — that every file carries a <site-meta> record, that it has a title, and that no two posts collapse to the same slug.

It runs automatically on git commit, and again in nix flake check, so it is enforced somewhere other than the machine that happens to have the hook installed.

To iterate on one post with live reload:

typst watch --features html posts/2026-08-27-hello.typ

Note this renders the post standalone, without the site's stylesheet — useful for checking the content compiles and the maths looks right, not the layout.

Formatting #

typstyle runs on commit. typstyle -i <file> to fix in place.