Skip to main content

Check links for Markdown-based site

Project description

Linkchecker for Markdown-based static generated sites

Actions Status pypi versions PyPi Download stats

Python Requests based simple check of links in Markdown .md files only. I got frustrated with all the false positives and moreso the false negatives from LinkChecker.py, which is also very slow and only works with HTML. This tool is very helpful for large Markdown-based Jekyll and Hugo sites. It is very fast and simple--it's what we use to check https://www.scivision.dev

Install

for latest release:

python -m pip install linkcheckmd

or for latest development version.

git clone https://github.com/scivision/linkchecker-markdown

pip install -e linkchecker-markdown

Usage

The static site generator does NOT have to be running for these tests--it looks at the .md files directly. Assuming your webpage Markdown files have top-level directory ~/web:

  • Jekyll

    linkcheckMarkdown ~/web/_posts
    
  • Hugo

    linkcheckMarkdown ~/web/content
    

The -v --verbose options prints the URLs as they are checked. Observe that URLs from different markdown files are interleaved, showing the asynchronous nature of this program.

Alternatives

Strict anti-leeching methods cause false positives with this and other link checking programs.

Alternative solutions include:

  • use an asyncio-based web browser interface like Arsenic
  • use Go-based htmltest.
  • GitHub Action for checking links in Markdown files.
  • Netlify link-check plugin

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

linkcheckmd-1.1.1.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file linkcheckmd-1.1.1.tar.gz.

File metadata

  • Download URL: linkcheckmd-1.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0.post20200511 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for linkcheckmd-1.1.1.tar.gz
Algorithm Hash digest
SHA256 e37c823ad8f0c0b85bcbf153ecad9aa4c03c8eec770ee25a8c294794115e7a9b
MD5 d6e641864ba58740dc1787b8b19f9f10
BLAKE2b-256 ff73032e394141064bf12b61a2d62239fdb9ee2d9ed7e1926379e1f9a1674071

See more details on using hashes here.

Supported by

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