-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the mdbook-linkcheck backend #27
Changes from all commits
d39ba39
8b47122
acf36f8
79052b4
66d2008
046dc79
0cedd25
04cee3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,11 @@ for you to talk with someone who **does** know the code, or who wants | |
to pair with you and figure it out. Then you can work on writing up | ||
what you learned. | ||
|
||
To help prevent accidentally introducing broken links, we use the | ||
`mdbook-linkcheck`. If installed on your machine `mdbook` will automatically | ||
invoke this link checker, otherwise it will emit a warning saying it couldn't | ||
be found. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what kind of links does this check? can it test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It reads the contents of the raw chapters then uses Fetching pages from the web is disabled by default because it can take a while when your book has lots of them. Therefore you need to set |
||
|
||
``` | ||
$ cargo install mdbook-linkcheck | ||
``` |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
if command -v mdbook >/dev/null 2>&1; then | ||
echo "mdbook already installed at $(command -v mdbook)" | ||
else | ||
echo "installing mdbook" | ||
cargo install mdbook --vers "0.0.28" | ||
fi | ||
function cargo_install() { | ||
local name=$1 | ||
local version=$2 | ||
|
||
if command -v ghp-import >/dev/null 2>&1; then | ||
echo "ghp-import already installed at $(which ghp-import)" | ||
else | ||
echo "installing ghp-import" | ||
pip install --user ghp-import | ||
fi | ||
if command -v $name >/dev/null 2>&1; then | ||
echo "$name is already installed at $(command -v $name)" | ||
else | ||
echo "Installing $name" | ||
cargo install $name --version $version | ||
fi | ||
} | ||
|
||
cargo_install mdbook 0.1.1 | ||
cargo_install mdbook-linkcheck 0.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, I meant to purge these at some point...