Skip to main content

Tool for finding broken references and links in Markdown files.

Project description

Markdown RefCheck

PyPI Downloads Python License: MIT CI/CD

Markdown RefCheck is a simple tool that checks Markdown references to find any broken links. It helps keeping your documentation free from broken section refs, missing images and files, and unavailable website links.

Features

  • 🔍 Reference Detection — Validate links, images, file refs, and header anchors
  • 🌐 Remote URL Checking — Validate external HTTP/HTTPS links (optional)
  • 💬 Inline Ignore Comments — Suppress false positives with <!-- refcheck-ignore --> directives
  • ⚙️ CI/CD Ready — Exit codes and --no-color for automation
  • 🚀 Pre-commit Integration — Available as a pre-commit hook

Installation

pip install refcheck
# or
pipx install refcheck

Quick Start

# Check a single file
refcheck README.md

# Check a directory recursively
refcheck docs/

# Include remote URL validation
refcheck docs/ --check-remote

Example output:

$ refcheck README.md

[+] 1 Markdown files to check.
- README.md

[+] FILE: README.md...
README.md:3: #introduction - OK
README.md:5: #installation - OK
README.md:6: #getting-started - OK

Reference check complete.

============================| Summary |=============================
🎉 No broken references!
====================================================================

For all CLI options, see the CLI Reference.

Pre-commit

# .pre-commit-config.yaml
- repo: https://github.com/flumi3/refcheck
  rev: v0.6.1
  hooks:
    - id: refcheck
      args: ["docs/", "--exclude", "docs/filetoexclude.md"]

See the Integration Guide for CI/CD and other workflow setups.

Documentation

Contributing

Contributions are welcome! See CONTRIBUTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

refcheck-0.6.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refcheck-0.6.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file refcheck-0.6.1.tar.gz.

File metadata

  • Download URL: refcheck-0.6.1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for refcheck-0.6.1.tar.gz
Algorithm Hash digest
SHA256 0743592e5f9378fea48f31de42c3a88a7e7a14981d84d72b7698e2f9aea04ad4
MD5 dc0eb5f59566e89f0d57d91d27569a8c
BLAKE2b-256 1e64d6eb026e1842735b8b352b5b2843e3a8d7154a8b3aa3951c381078c92e31

See more details on using hashes here.

Provenance

The following attestation bundles were made for refcheck-0.6.1.tar.gz:

Publisher: ci-cd.yml on flumi3/markdown-refcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file refcheck-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: refcheck-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for refcheck-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b47b121e146df15148b5e6b7b0bcbfd79f196343e1c46c81ff1c6b1f2d9a90a5
MD5 2841d76aef53c128fded581d1915952f
BLAKE2b-256 1edad5e0e20c4bcb0653d65575c8242b1e8a1d23b517b892e0ad14c2c6e0d962

See more details on using hashes here.

Provenance

The following attestation bundles were made for refcheck-0.6.1-py3-none-any.whl:

Publisher: ci-cd.yml on flumi3/markdown-refcheck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page