Skip to content

gospodima/mdrefcheck

Repository files navigation

mdrefcheck

PyPI version crates.io version Build Status License

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.0
    hooks:
      - id: mdrefcheck

About

CLI tool to validate references and links in Markdown files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages