File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 5757 cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
5858
5959 - name : Check build
60- run : mdbook build
60+ run : ENABLE_LINKCHECK=1 mdbook build
6161
6262 - name : Deploy to gh-pages
6363 if : github.event_name == 'push'
Original file line number Diff line number Diff line change @@ -56,12 +56,14 @@ The build files are found in the `book/html` directory.
5656
5757### Link Validations
5858
59- We use ` mdbook-linkcheck2 ` to validate URLs included in our documentation.
60- ` linkcheck ` will be run automatically when you build with the instructions in the section above.
59+ We use ` mdbook-linkcheck2 ` to validate URLs included in our documentation. Link
60+ checking is ** not** run by default locally, though it is in CI. To enable it
61+ locally, set the environment variable ` ENABLE_LINKCHECK=1 ` like in the
62+ following example.
6163
62- > [ !NOTE ]
63- > The link validation can be skipped by setting the following environment variable:
64- > ` SKIP_LINKCHECK=1 mdbook ... `
64+ ``` console
65+ $ ENABLE_LINKCHECK=1 mdbook serve
66+ `` `
6567
6668### Table of Contents
6769
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set_github_token() {
99 jq ' .config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
1010}
1111
12- if [ ! -z " $SKIP_LINKCHECK " ] ; then
12+ if [ -z " $ENABLE_LINKCHECK " ] ; then
1313 echo " Skipping link check."
1414 exit 0
1515fi
You can’t perform that action at this time.
0 commit comments