6 releases
Uses new Rust 2024
| 0.2.1 | Jan 24, 2026 |
|---|---|
| 0.2.0 | Nov 19, 2025 |
| 0.1.8 | Sep 22, 2025 |
#1257 in Development tools
27KB
568 lines
mdrefcheck
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.
Features
- 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.
Installation
Cargo
cargo install mdrefcheck
PyPI
pip install mdrefcheck
or run it directly in an isolated environment, e.g., with uvx:
uvx mdrefcheck .
Pre-commit integration
Add this to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/gospodima/mdrefcheck
rev: v0.2.1
hooks:
- id: mdrefcheck
Dependencies
~7–12MB
~218K SLoC