From fc1774a8adb7655c7e70cdd44baf240f5131497f Mon Sep 17 00:00:00 2001 From: ngirard Date: Sun, 18 Aug 2019 13:15:35 +0200 Subject: [PATCH] Manual: automated link checking using mdbook-linkcheck (#61) * travis.yml: add before_script instruction for mdbook and mdbook-linkcheck * book.toml: add mdbook-linkcheck config options * Update book.toml --- .travis.yml | 2 ++ docs/book.toml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index f41138f..b8dbaf6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ env: before_script: - rustup component add rustfmt + - if [[ -n "$BUILD_DOCS" ]]; then (cargo install mdbook --force || true); fi + - if [[ -n "$BUILD_DOCS" ]]; then (cargo install mdbook-linkcheck --force || true); fi matrix: fast_finish: true diff --git a/docs/book.toml b/docs/book.toml index 215f872..2f5e1bb 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -11,3 +11,11 @@ create-missing = false [output.html] git-repository-url = "https://github.com/async-rs/async-std" git-repository-icon = "fa-github" + +[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