Menu

Broken links in docs are silent. This Python CLI names the broken kind.
πŸ“°

Broken links in docs are silent. This Python CLI names the broken kind.

DEV Community: githubΒ·Haider AliΒ·7 days ago
#M1gEWAIT
#devtogithub#technology#devto#dev#sample
Reading 0:00
15s threshold

You update a docs page, move a file, rename a heading. Nothing breaks loudly. A reader clicks a link weeks later and lands on a 404 β€” or worse, on the right page with the wrong anchor, staring at the top while the section they wanted is three screens down.

Most link checkers give you one word: broken. This one tells you which kind of broken, because the fix is different.

broken-link-checker-cli is a Python CLI. Standard library only. It scans .md , .markdown and .html files, checks every link for real, and reports each link as one of three things:

OK β€” the page exists, and the anchor on it exists too.

BROKEN (page) β€” the page itself is missing.

BROKEN (anchor) β€” the page exists, the anchor on it does not.

A link is never reported OK unless its check actually ran. If an anchor cannot be checked (a PDF, for example), the link is reported SKIPPED with the reason β€” never silently OK. Links inside fenced code blocks and inline code are ignored, so code samples never produce false failures.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.