aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJim Newsome <jnewsome@torproject.org>2023-11-09 10:39:46 -0600
committerJim Newsome <jnewsome@torproject.org>2023-11-09 18:45:20 -0600
commit1eef207b51ddbb92c2bc4a02ae7b46929583355b (patch)
tree4000a7da4865f654687a1e9acde19c6b4eaefbfe /.gitlab-ci.yml
parent9205c7a86ffbea46d16f0a13e205100fc3ba1c76 (diff)
downloadtorspec-1eef207b51ddbb92c2bc4a02ae7b46929583355b.tar.gz
torspec-1eef207b51ddbb92c2bc4a02ae7b46929583355b.zip
Use mdbook-linkcheck to detect missing defs for ref-style links
Suppose in raw markdown we have: ```markdown See [foo][barr]. [bar]: https://link-to-bar ``` The intent is to link the text "foo", but because of a typo it used the label barr instead of bar. The result is that the rendered html won't have a link at all. The text will be rendered literally as `[foo][barr]`. Since there's no link (not even a broken one), a link checker run over the rendered output won't spot the problem. The mdbook-linkcheck plugin correctly detects this issue. However, it doesn't understand links that go between our two mdbook projects since the relative paths in the source don't match the relative paths in the rendered output. Since checking whether the links are non-broken is already covered by `bin/check_links` (using linklint), we can disable checking the link destinations altogether.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml4
1 files changed, 2 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: