File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
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 : ENABLE_LINKCHECK=1 mdbook build
60+ run : 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 @@ -57,13 +57,8 @@ The build files are found in the `book/html` directory.
5757### Link Validations
5858
5959We 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.
63-
64- ``` console
65- $ ENABLE_LINKCHECK=1 mdbook serve
66- ```
60+ checking is run locally only if the ` mdbook-linkcheck2 ` crate is installed. Otherwise,
61+ a warning is printed to the user.
6762
6863### Table of Contents
6964
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ set_github_token() {
99 jq ' .config.output.linkcheck."http-headers"."github\\.com" = ["Authorization: Bearer $GITHUB_TOKEN"]'
1010}
1111
12- if [ -z " $ENABLE_LINKCHECK " ] ; then
13- echo " Skipping link check."
12+ if ! which $LINKCHECK_BINARY & > /dev/null && [ -z " $GITHUB_EVENT_NAME " ] ; then
13+ echo " WARNING: Skipping link check. Consider running 'cargo install $LINKCHECK_BINARY ' ."
1414 exit 0
1515fi
1616
You can’t perform that action at this time.
0 commit comments