Expand description
A library and command-line tool for detecting broken links in Markdown files.
By default, this tool detects broken links like “foo” (target file does not exist) and broken header links like “foo” (target file exists but specific header does not exist)
§Command-line usage
Check a single file:
broken-md-links input.md
Check a whole directory:
broken-md-links dir/
§Output
There are several levels of verbosity:
-v silent
: display nothing (exit code will be 0 if there was no broken link)-v errors
: display errors only-v warn
: display errors and warnings (the default)-v info
: display the list of analyzed files as well-v verbose
: display detailed informations-v trace
: display debug informations
Structs§
- Checker
Options - Broken links checker options
- Detected
Broken Link - Detected broken link
Enums§
- Checker
Error - Checker error
Functions§
- check_
broken_ links - Check broken links in a Markdown file or directory
- check_
broken_ links_ in_ dir - check_
file_ broken_ links - generate_
slugs - Get all headers of a Markdown file as slugs This function is used to check if the header specified in a link exists in the target file Returns an error message if the operation failed for any reason
- slugify
- Slugify a Markdown header This function is used to generate slugs from all headers of a Markdown file (see the ‘generate_slugs’ function)
Type Aliases§
- File
Links Cache - Markdown file links cache