Skip to content

Commit 9a1a7a9

Browse files
committed
Have linkchecker skip print.html
rust-lang/mdBook#789 causes mdbook to generate print.html content with relative URLS that are still relative to the individual HTML files and doesn't correct for the fact that print.html isn't in the same folder. This commit will verify that the relative URLs are correct in all of the HTML output except for print.html I am assuming that people would like to see the images again in the Discovery book website as they click through the various chapters, even if the printable version is still broken. If the PR with this commit is merged, an issue should be created to track the fact that this change should be reverted once mdbook handles relative links correctly in its generaton of print.html
1 parent e78a7d3 commit 9a1a7a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci/script.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ main() {
44
# test that building the book works
55
mdbook build
66

7-
linkchecker book
7+
# mdbook doesn't handle relative links correctly in print.html so skip it.
8+
linkchecker --ignore-url "print.html" book
89

910
# now check this as a directory of the bookshelf
1011
rm -rf shelf
1112
mkdir shelf
1213
mv book shelf
13-
linkchecker shelf
14+
# Skipping bad relative link errors in print.html again here.
15+
linkchecker --ignore-url "print.html" shelf
1416

1517
mv shelf/book .
1618
rmdir shelf

0 commit comments

Comments
 (0)