tech-community-slacks icon indicating copy to clipboard operation
tech-community-slacks copied to clipboard

Added a markdown link checker

Open mbernier opened this issue 9 months ago • 0 comments

This will allow all the links in the markdown text to be checked before a merge or commit. It can run as a pre-commit hook locally and as a PR merge check.

This should:

  1. Run the script inside a containerized GitHub Actions environment.
  2. Checks for broken links in .md files.
  3. Fails the PR if broken links are found.

Example output:

If a link is broken in README.md:

❌ Error: Broken links found in README.md:
  - [Docs](https://example.com/invalid-page)

To set this up as a GitHub status check on PR merge:

Add a GitHub Status Check If you want GitHub to block merging until the check passes:

  1. Go to Repository Settings → Branch Protection Rules.
  2. Add "Markdown Link Check" as a required check.

mbernier avatar Feb 14 '25 23:02 mbernier