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
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
python linkcheck.py ~/web/_posts
-
Hugo
python linkcheck.py ~/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.
Caveats
Strict anti-leeching methods cause false positives with this and other link checking programs. The solution may be to use an asyncio-based web browser interface like Arsenic in this program, or simply use Go-based htmltest.
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.0.1.tar.gz
.
File metadata
- Download URL: linkcheckmd-1.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061db3c47012e41f53f240fd768bf9971424b50f80b634260838f11857d5a8f2 |
|
MD5 | 0147f8b62f2e0c19488f63d43f94edbd |
|
BLAKE2b-256 | 0068b7d6ca23569789306116484deb0dd20d2b206fa0a5f4a84aba610df26043 |