markdown-checker is a markdown link validation reporting tool. It provides a couple of functions to validate relative paths and web URLs.
Install the package:
pip install markdown-checker
- Run
pip install markdown-checker
. - Run
markdown-checker -d {src} -f {func} -gu {url}
. Replace{src}
with the directory you want to analyze,{func}
with the available functions likecheck_broken_paths
,{gu}
with your contribution guidance full URL. - The output will be displayed in the terminal and in a
comment.md
file.
For more customizations read the docs.
You can run this tool within a GitHub workflow using the action-check-markdown GitHub action.
The action will automatically post the output of the tool to your GitHub pull request as a comment.
The library provides the following functions:
This function ensures that any relative path in your files are working.
Example:
markdown-checker -d . -f check_broken_paths -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md
This function ensures that any web URL in your files is working and returning 200 status code.
Example:
markdown-checker -d . -f check_broken_urls -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md
This function checks if country specific locale is present in URLs.
Example:
markdown-checker -d . -f check_urls_locale -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md
This function ensures that any relative path has tracking in it.
Example:
markdown-checker -d . -f check_paths_tracking -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md
This function ensures that any URL has tracking in it.
Example:
markdown-checker -d . -f check_urls_tracking -gu https://github.com/john0isaac/markdown-checker/blob/main/CONTRIBUTING.md