Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a markdown link checker #304

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mbernier
Copy link

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.

Added a yaml to manage a forthcoming markdown link checker script
Checks links on commit and PR merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant