|0.16.1||Dec 19, 2022|
|0.15.4||Aug 23, 2022|
|0.15.2||Jul 11, 2022|
|0.14.3||May 15, 2021|
|0.1.1||Jun 7, 2018|
#93 in Text processing
21 downloads per month
Markup Link Checker
Check for broken links in markup files. Currently
markdown files are supported. The Markup Link Checker can easily be integrated in your CI pipeline to prevent broken links in your markup docs.
- Find and check links in
- Support HTML links and plain URLs in
- Validated absolute and relative file paths and URLs
- User friendly command line interface
- Easy CI pipeline integration
- Very fast execution using async
- Efficient link resolving strategy which tries with minimized network load
- Throttle option to prevent 429 Too Many Requests errors
- Configure via config file
- Report broken links via GitHub workflow commands
There are different ways to install and use mlc.
Use rust's package manager cargo to install mlc from crates.io:
cargo install mlc
To download a compiled binary version of mlc go to github releases and download the binaries compiled for
CI Pipeline Integration
Use mlc in GitHub using the GitHub-Action from the Marketplace.
- name: Markup Link Checker (mlc) uses: firstname.lastname@example.org
Use mlc command line arguments using the
- name: Markup Link Checker (mlc) uses: email@example.com with: args: ./README.md
The action does uses GitHub workflow commands to highlight broken links:
To integrate mlc in your CI pipeline running in a linux x86_64 environment you can add the following commands to download the tool:
curl -L https://github.com/becheran/mlc/releases/download/v0.16.1/mlc -o mlc chmod +x mlc
For example take a look at the ntest repo which uses mlc in the CI pipeline.
Use the mlc docker image from the docker hub which includes mlc.
Once you have mlc installed, it can be called from the command line. The following call will check all links in markup files found in the current folder and all subdirectories:
Another example is to call mlc on a certain directory or file:
Call mlc with the
--help flag to display all available cli arguments:
The following arguments are available:
||Only positional argument. Path to directory which shall be checked with all sub-dirs. Can also be a specific filename which shall be checked.|
||Show verbose debug information|
||Do not check any web links. Renamed from
||Set the flag, if the file extension shall be checked as well. For example the following markup link
||Print current version of mlc|
||Comma separated list of directories or files which shall be ignored. For example|
||Comma separated list of links which shall be ignored. Use simple
||Comma separated list list of markup types which shall be checked [possible values: md, html]|
||All links to the file system starting with a slash on linux or backslash on windows will use another virtual root dir. For example the link in a file
||Number of milliseconds to wait in between web requests to the same host. Default is zero which means no throttling. Set this if you need to slow down the web request frequency to avoid
All optional arguments which can be passed via the command line can also be configured via the
.mlc.toml config file in the working dir where mlc is started:
# Print debug information to console debug = true # Do not check web links offline = true # Check the exact file extension when searching for a file match-file-extension= true # List of files and directories which will be ignored ignore-path=["./ignore-me","./src"] # List of links which will be ignored ignore-links=["http://ignore-me.de/*","http://*.ignoresub-domain/*"] # List of markup types which shall be checked markup-types=["Markdown","Html"] # Wait time in milliseconds between http request to the same host throttle= 100 # Path to the root folder used to resolve all relative paths root-dir="./"
Checkout the changelog file to see the changes between different versions.
This project is licensed under the MIT License - see the LICENSE file for more details.