Skip to content

Commit ce7f7f8

Browse files
committed
Document how to run linkcheck locally
1 parent edd83c5 commit ce7f7f8

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ order to write correct Unsafe Rust programs. Due to the nature of this problem,
1919
it may lead to unleashing untold horrors that shatter your psyche into a billion
2020
infinitesimal fragments of despair.
2121

22-
### Requirements
22+
## Requirements
2323

2424
Building the Nomicon requires [mdBook]. To get it:
2525

2626
[mdBook]: https://github.com/rust-lang/mdBook
2727

2828
```bash
29-
$ cargo install mdbook
29+
cargo install mdbook
3030
```
3131

3232
### `mdbook` usage
3333

3434
To build the Nomicon use the `build` sub-command:
3535

3636
```bash
37-
$ mdbook build
37+
mdbook build
3838
```
3939

4040
The output will be placed in the `book` subdirectory. To check it out, open the
@@ -43,13 +43,23 @@ build` and it'll open the index page in your default browser (if the process is
4343
successful) just like with `cargo doc --open`:
4444

4545
```bash
46-
$ mdbook build --open
46+
mdbook build --open
4747
```
4848

4949
There is also a `test` sub-command to test all code samples contained in the book:
5050

5151
```bash
52-
$ mdbook test
52+
mdbook test
53+
```
54+
55+
### `linkcheck`
56+
57+
We use the `linkcheck` tool to find broken links.
58+
To run it locally:
59+
60+
```sh
61+
curl -sSLo linkcheck.sh https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
62+
sh linkcheck.sh --all nomicon
5363
```
5464

5565
## Contributing

0 commit comments

Comments
 (0)