Skip to content

Commit 3f21079

Browse files
authored
Merge pull request #93 from rust-random/remove-local-doc-links
Remove local doc links
2 parents 26b4132 + eda1937 commit 3f21079

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

src/contrib-doc.md

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ To build all API documentation for all crates in the
2121
[rust-random/rand](https://github.com/rust-random/rand) repository, run:
2222

2323
```sh
24-
# Build doc for all modules:
25-
cargo doc --all --no-deps
24+
# Optionally, enable some unstable but widely used doc features:
25+
export RUSTDOCFLAGS="--cfg docsrs -Zunstable-options --generate-link-to-definition"
2626

27-
# And open it:
28-
xdg-open target/doc/rand/index.html
27+
# Build doc for all crates in the workspace:
28+
cargo doc --workspace --no-deps --all-features --open
2929
```
30+
(Alternatively, check the `Cargo.toml` under `[package.metadata.docs.rs]` which may suggest workspace- or crate-specific configuration.)
3031

3132
On Linux, it is easy to set up automatic rebuilds after any edit:
3233
```sh
@@ -39,9 +40,6 @@ After editing API documentation, we recommend testing examples:
3940
cargo test --doc
4041
```
4142

42-
Rand API docs are automatically built and hosted at
43-
[rust-random.github.io/rand] for the latest code in master.
44-
4543
### Getrandom crate
4644

4745
The [rust-random/getrandom](https://github.com/rust-random/getrandom)
@@ -64,12 +62,7 @@ When referring to an item from within another crate,
6462

6563
1. if that item is accessible via a crate dependency (even if not via the
6664
public API), use the Rust item path
67-
2. when linking to another crate within the `rust-random/rand` repository,
68-
relative paths within the generated documentation files (under `target/doc`)
69-
can be used; these work on [rust-random.github.io/rand] but not
70-
currently on `docs.rs` (see [docs#204])
71-
3. if neither of the above are applicable, use an absolute link
72-
4. consider revising documentation, e.g. refer to the crate instead
65+
2. otherwise, use an absolute link to docs.rs
7366

7467
Examples:
7568

@@ -129,5 +122,4 @@ API documentation:
129122
ln -s ../rand/target/doc rand
130123
```
131124

132-
[rust-random.github.io/rand]: https://rust-random.github.io/rand
133125
[docs#204]: https://github.com/rust-lang/docs.rs/issues/204

src/intro.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ This book contains:
1313
Outside this book, you may want:
1414

1515
- [API reference for the latest release](https://docs.rs/rand/)
16-
- [API reference for the master branch](https://rust-random.github.io/rand/)
1716
- [The Rand repository](https://github.com/rust-random/rand/)
1817
- [The Book source](https://github.com/rust-random/book/)

0 commit comments

Comments
 (0)