aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--mdbook/proposals/book.toml10
-rw-r--r--mdbook/spec/book.toml10
3 files changed, 22 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 06942af..ddd399d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,7 +17,7 @@ build:
script:
- env
- apt-get update && apt-get install -y git python3 python3-yaml
- - ./bin/via-cargo-install-in-ci mdbook
+ - ./bin/via-cargo-install-in-ci mdbook mdbook-linkcheck
- |
if test "$MMDC" != "" ; then
./bin/mermaid-cli-in-ci
@@ -46,7 +46,7 @@ link-check:
- when: always
script:
- apt-get update && apt-get install -y git python3 python3-yaml linklint
- - ./bin/via-cargo-install-in-ci mdbook
+ - ./bin/via-cargo-install-in-ci mdbook mdbook-linkcheck
- ./bin/build_html
- ./bin/check_links
artifacts:
diff --git a/mdbook/proposals/book.toml b/mdbook/proposals/book.toml
index fdbe64a..8a6045b 100644
--- a/mdbook/proposals/book.toml
+++ b/mdbook/proposals/book.toml
@@ -19,6 +19,16 @@ theme = "../theme"
# additional-js = ["theme/pagetoc.js"]
no-section-label = true
+[output.linkcheck]
+warning-policy = "error"
+# We effectively disable checking link destinations by excluding
+# all links (`.*`).
+#
+# We're only using linkcheck to validate that reference-style links have *some*
+# definition in the markdown, ensuring that *some* link will be generated. We
+# validate that those links are correct using a separate tool (`bin/check_links`)
+exclude = [ '.*' ]
+
[output.html.search]
enable = false
diff --git a/mdbook/spec/book.toml b/mdbook/spec/book.toml
index b85e320..58dc503 100644
--- a/mdbook/spec/book.toml
+++ b/mdbook/spec/book.toml
@@ -25,3 +25,13 @@ theme = "../theme"
"/tor-design.html" = "https://svn.torproject.org/svn/projects/design-paper/tor-design.pdf"
"/walking-onions.html" = "https://spec.torproject.org/proposals/323-walking-onions-full.html"
# END AUTO-GENERATED REDIRECTS
+
+[output.linkcheck]
+warning-policy = "error"
+# We effectively disable checking link destinations by excluding
+# all links (`.*`).
+#
+# We're only using linkcheck to validate that reference-style links have *some*
+# definition in the markdown, ensuring that *some* link will be generated. We
+# validate that those links are correct using a separate tool (`bin/check_links`)
+exclude = [ '.*' ]