Skip to content

onBrokenMarkdownLinks: "warn"` allows broken links to silently pass CI #185

@adity1raut

Description

@adity1raut

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions