A CLI tool to validate references and links in Markdown files (CommonMark spec).
It helps to ensure that your documentation is free from broken section links, missing images or files.
- Validate local file paths in image and file references
- Check section links against actual headings, following GitHub Flavored Markdown (GFM) rules, including cross-file references (e.g.
./subfolder/another-file.md#heading-link) - Detect broken reference-style links
- Basic email validation
- Ignore files support via ignore crate.
cargo install mdrefcheckpip install mdrefcheckor run it directly in an isolated environment, e.g., with uvx:
uvx mdrefcheck .Add this to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/gospodima/mdrefcheck
rev: v0.2.0
hooks:
- id: mdrefcheck