Field note · September 19, 2026
The link checker that runs on every build
Every build walks the generated HTML and verifies that each internal href and src resolves to something on disk. It is about forty lines and it has ca
Every build walks the generated HTML and verifies that each internal href and src resolves to something on disk. It is about forty lines and it has caught more real bugs than anything else in the toolchain.
npm run check
# Checked 9143 internal references across 176 pages.Most static site generators will happily emit a link to a page that does not exist. The failure surfaces months later as a 404 in someone's analytics, if anyone is looking.
A link is a claim about the filesystem. Claims should be tested. It catches renamed datasets, deleted lessons, and — most often — a typo'd slug in a pattern's cross-reference.
It also enforces the base path, which is the bug it was originally written for. A site served from a sub-path needs every internal URL prefixed, and exactly one hand-written link forgetting the prefix produces a 404 that works fine in local preview. The checker fails on any internal link missing it, so that class of bug cannot reach a deploy.
What it deliberately does not do is check external links. Those break for reasons outside the repository, on someone else's schedule, and a build that fails because a third party reorganised their docs is a build that gets ignored.