Document how to run linkcheck locally

pull/282/head
Yuki Okushi 3 years ago
parent edd83c5d7e
commit ce7f7f8998
No known key found for this signature in database
GPG Key ID: DABA5B072961C18A

@ -19,14 +19,14 @@ order to write correct Unsafe Rust programs. Due to the nature of this problem,
it may lead to unleashing untold horrors that shatter your psyche into a billion it may lead to unleashing untold horrors that shatter your psyche into a billion
infinitesimal fragments of despair. infinitesimal fragments of despair.
### Requirements ## Requirements
Building the Nomicon requires [mdBook]. To get it: Building the Nomicon requires [mdBook]. To get it:
[mdBook]: https://github.com/rust-lang/mdBook [mdBook]: https://github.com/rust-lang/mdBook
```bash ```bash
$ cargo install mdbook cargo install mdbook
``` ```
### `mdbook` usage ### `mdbook` usage
@ -34,7 +34,7 @@ $ cargo install mdbook
To build the Nomicon use the `build` sub-command: To build the Nomicon use the `build` sub-command:
```bash ```bash
$ mdbook build mdbook build
``` ```
The output will be placed in the `book` subdirectory. To check it out, open the 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
successful) just like with `cargo doc --open`: successful) just like with `cargo doc --open`:
```bash ```bash
$ mdbook build --open mdbook build --open
``` ```
There is also a `test` sub-command to test all code samples contained in the book: There is also a `test` sub-command to test all code samples contained in the book:
```bash ```bash
$ mdbook test mdbook test
```
### `linkcheck`
We use the `linkcheck` tool to find broken links.
To run it locally:
```sh
curl -sSLo linkcheck.sh https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all nomicon
``` ```
## Contributing ## Contributing

Loading…
Cancel
Save