Skip to content
A backend for `mdbook` which will check your links for you.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Ran rustfmt and cargo-fix Jun 21, 2019
tests Ran rustfmt May 22, 2019
.gitignore Preparations for 0.1.0 release Jan 24, 2018
.travis.yml
Cargo.lock (cargo-release) start next development iteration 0.3.0 Jun 21, 2019
Cargo.toml (cargo-release) start next development iteration 0.3.0 Jun 21, 2019
LICENSE Initial commit Jan 13, 2018
README.md The smoke test now works Sep 16, 2018
release.toml Added extra tests for detecting nested relative links Sep 8, 2018

README.md

MDBook LinkCheck

Build Status Crates.io Docs.rs license

A backend for mdbook which will check your links for you. For use alongside the built-in HTML renderer.

Warning: Not 100% complete. May eat your laundry!

Getting Started

First you'll need to install mdbook-linkcheck.

$ cargo install mdbook-linkcheck

Next you'll need to update your book.toml to let mdbook know it needs to use the mdbook-linkcheck backend.

[book]
title = "My Awesome Book"
authors = ["Michael-F-Bryan"]

[output.html]

[output.linkcheck]

And finally you should be able to run mdbook build like normal and everything should Just Work.

$ mdbook build

Configuration

The link checker's behaviour can be configured by setting options under the output.linkcheck table in your book.toml.

...

[output.linkcheck]
# Should we check links on the internet? Enabling this option adds a
# non-negligible performance impact
follow-web-links = false

# Are we allowed to link to files outside of the book's root directory? This
# may help prevent linking to sensitive files (e.g. "../../../../etc/shadow")
traverse-parent-directories = false

# If necessary, you can exclude one or more web links from being checked with
# a list of regular expressions
exclude = [ "google\\.com" ]
You can’t perform that action at this time.