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.0
  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.0.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.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: refcheck-0.6.0.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.0.tar.gz
Algorithm Hash digest
SHA256 8c0ddbd68d2b54e2bd517e47f66d9ecbbce4ff14203fff9d89d48e1fb16c184e
MD5 d731b09e27ba23705934e323515d2e31
BLAKE2b-256 0e1a02f29a4fe69cc55ae9ec2238ab746fd29ed9858ac8c88200b8a03dda830a

See more details on using hashes here.

Provenance

The following attestation bundles were made for refcheck-0.6.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: refcheck-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3e112b8542afb204d176214f6de1fe38be516722c957fa8824d184598547865
MD5 65ba969b2438746c8265d72863a27b4b
BLAKE2b-256 35100105b21d76974191fd57be3d6e7916108c9f03723430be0024fe2d8cfcca

See more details on using hashes here.

Provenance

The following attestation bundles were made for refcheck-0.6.0-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