Crate broken_md_links

source ·
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

Enums

Functions

  • Check broken links in a Markdown file or directory
  • 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 a Markdown header This function is used to generate slugs from all headers of a Markdown file (see the ‘generate_slugs’ function)

Type Aliases