File: docusaurus.config.js — Line 16
Description
onBrokenMarkdownLinks is set to "warn" while onBrokenLinks is correctly
set to "throw". This inconsistency means that broken relative Markdown links
such as [see here](./deleted-page) only print a warning in the build log and
never fail the CI pipeline. As pages get renamed or removed over time, stale
broken links silently accumulate in the docs and get deployed to production,
resulting in 404 errors for users.
Current Code
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn", // broken links pass CI silently
Fixed Code
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw", // broken links now fail the build
What Changes
|
Behavior |
| Before |
Broken Markdown links pass CI with a warning, get deployed, and users hit 404 pages |
| After |
Build fails immediately when any broken Markdown link is found — dead links are caught before reaching production |
File:
docusaurus.config.js— Line 16Description
onBrokenMarkdownLinksis set to"warn"whileonBrokenLinksis correctlyset to
"throw". This inconsistency means that broken relative Markdown linkssuch as
[see here](./deleted-page)only print a warning in the build log andnever fail the CI pipeline. As pages get renamed or removed over time, stale
broken links silently accumulate in the docs and get deployed to production,
resulting in 404 errors for users.
Current Code
Fixed Code
What Changes