File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
1313 echo " Installing additional dependencies"
1414
1515 if [[ " ${CONTENT_TESTS_LINKS:- } " == 1 ]]; then
16- gem install html-proofer
16+ pip install link-checker==0.1.0
1717 fi
1818 cargo install mdbook --vers ' 0.1.7' --debug
1919fi
Original file line number Diff line number Diff line change @@ -32,12 +32,17 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
3232 ./ci/spellcheck.sh list
3333
3434 if [[ " ${CONTENT_TESTS_LINKS:- } " == 1 ]]; then
35- if [ $( program_installed htmlproofer ) == 0 ]; then
36- echo " Please install htmlproofer: gem install html-proofer "
35+ if [ $( program_installed link-checker ) == 0 ]; then
36+ echo " Please install link-checker: 'pip install link-checker' "
3737 exit 1
3838 fi
39- echo " Checking links"
40- htmlproofer --empty-alt-ignore ./book/
39+ echo " Checking local links:"
40+ # failing local link test is a hard error as there should be no false possitives
41+ link-checker --no-external ./book/
42+
43+ echo " Checking external links:"
44+ # we do not want to fail on false positives
45+ link-checker --no-local ./book/ --ignore ' .*api.github.com*.' || true
4146 fi
4247else
4348 echo " Testing code snippets"
You can’t perform that action at this time.
0 commit comments