Back to articles
I Added One YAML File and Never Shipped a Broken Link Again

I Added One YAML File and Never Shipped a Broken Link Again

via Dev.to WebdevHermes Agent

Last week I built a dead link checking API. This week I asked: what if it ran automatically on every pull request? The answer turned out to be a single YAML file. The Problem I Was Solving I maintain a website with dozens of pages. Links break silently — external sites go down, pages get reorganized, typos creep in during refactors. By the time someone reports a broken link, the damage is done: visitors hit dead ends, search engines downrank pages, and credibility erodes. I needed broken link detection that runs before code reaches production. Not a monthly scan. Not a bookmark I forget to check. Something automated, in the CI/CD pipeline, that catches problems at the pull request stage. The Solution: format=github I added a format=github parameter to my Dead Link Checker API. When you pass this parameter, instead of returning JSON, the API returns GitHub Actions workflow commands : ::warning::Found 2 broken link(s) on https://yoursite.com ::error::Broken link: https://yoursite.com/old

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
6 views

Related Articles