Build-Time Validation ¶
Documentation rots quietly. Someone renames a page, the old route keeps shipping, and a reader finds the broken link months later. CarvePress turns that into a build failure instead of a bug report.
What is checked ¶
Five things are validated against the resolved route table on every build:
- Internal links in page content, compared after the base prefix is stripped again, so a dead link is reported the way the author wrote it.
- Nav entries and sidebar entries, including items inside generated sidebar groups.
- The
prevandnextfrontmatter overrides. They are injected into the footer after the page HTML was validated, so without a check of their own they were the one internal link on a site that could point nowhere and still build green. - Carve cross-references (
</#section-id>), which fail when the target heading is gone or its id changed. - Redirect targets, plus a check that no redirect source collides with a real page.
What a failure looks like ¶
Every dead link on the site is reported in one error, not one build cycle per link:
carve-press: 3 dead internal link(s)
guide/theme.crv: /guide/layouts
guide/deploying.crv: /guide/ci
blog/announcement.crv: /reference/cli-options
That shape is deliberate. A migration that moves forty pages should tell you about all forty broken links at once.
Turning it off ¶
export default defineConfig({
title: 'Docs',
ignoreDeadLinks: true,
})In CI ¶
The Pages workflow for this repository builds the docs on pull requests without deploying them, so a broken link fails the check before anything reaches the published site. Deployment happens only on main.
See Writing Content for the author-facing rules and Deploying for the workflow itself.
Last updated