Summary
This version adds link and footnote validation and strict mode – two of the most frequently requested features. Zensical now checks all internal references at build time and reports issues with precise source locations, so broken links don't make it into your published documentation. Unlike MkDocs, which only validates final rendered links, Zensical also checks for unresolved references, as well as unused and shadowed definitions – covering the full lifecycle of a reference from definition to use.
Validation
Zensical scans every Markdown file in your project and resolves all internal references against each other: inline links, reference-style links, footnotes, link definitions, and anchor targets. Every check is individually configurable and enabled by default.
$ zensical build
...
Warning: page does not exist
╭─[ index.md:3:14 ]
│
3 │ [id]: non-existent.md
│ ───────┬───────
│ ╰───────── page does not exist
───╯The following checks for links and footnotes are now available:
unresolved_referencesunresolved_footnotesunused_definitionsunused_footnotesshadowed_definitionsshadowed_footnotesinvalid_linksinvalid_link_anchors
Strict mode
The new --strict command line flag causes the build to fail when any enabled validation check triggers, turning warnings into errors. This is useful for CI pipelines where you want to enforce link integrity and prevent broken documentation from being published:
$ zensical build --strict
...
Warning: unresolved link reference
╭─[ index.md:1:35 ]
│
1 │ This is an [unresolved reference][id].
│ ─┬
│ ╰── unresolved link reference
───╯
1 issue found
Aborted because --strict flag is setUpgrading
No changes to your configuration are required – all checks are enabled by default. It's quite likely that you'll run into at least some warnings – as we did – when upgrading, since before, it was easy to miss unused link definitions or unresolved references. If you want to disable validation entirely, you can use:
[project]
validation = falseAs always, if you run into any problems, please open an issue.