Check links for Markdown-based site
Project description
Linkchecker for Markdown-based static generated sites
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
File details
Details for the file linkcheckmd-1.1.2.tar.gz
.
File metadata
- Download URL: linkcheckmd-1.1.2.tar.gz
- Upload date:
- Size: 6.4 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.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5179c99f0ebe6b41378ccbfacc679a39058141c37230ee903f35e25bc12ccb51 |
|
MD5 | 2eed0e036ca8f98b4f8039764d6cef4a |
|
BLAKE2b-256 | b6c3c50b8a7d952e78af55936f85bb0ffaa5754103362234a60bd46a6f45fe61 |