Skip to content

Commit

Permalink
Improve the landing page for contributing to the libstd docs
Browse files Browse the repository at this point in the history
Libstd links directly to this section. Make it more useful.
  • Loading branch information
jyn514 committed Apr 8, 2023
1 parent 0520099 commit 3d8d66c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/building/compiler-documenting.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ like the standard library (std) or the compiler (rustc).
./x.py doc compiler library
```

See [the nightly docs index page](https://doc.rust-lang.org/nightly/) for a full list of books.

- Document internal rustc items

Compiler documentation is not built by default.
Expand Down
15 changes: 7 additions & 8 deletions src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ This section has moved to ["Using External Repositories"](./external-repos.md).

Documentation improvements are very welcome. The source of `doc.rust-lang.org`
is located in [`src/doc`] in the tree, and standard API documentation is generated
from the source code itself (e.g. [`lib.rs`]). Documentation pull requests function
from the source code itself (e.g. [`library/std/src/lib.rs`][std-root]). Documentation pull requests function
in the same way as other pull requests.

[`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc
[`lib.rs`]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1
[`std-root`]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1

To find documentation-related issues, sort by the [A-docs label][adocs].

Expand All @@ -288,12 +288,11 @@ You can find documentation style guidelines in [RFC 1574][rfc1574].

[rfc1574]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text

In many cases, you don't need a full `./x.py doc --stage 2`, which will build
the entire stage 2 compiler and compile the various books published on
[doc.rust-lang.org][docs]. When updating documentation for the standard library,
first try `./x.py doc library`. If that fails, or if you need to
see the output from the latest version of `rustdoc`, add `--stage 1`.
Results should appear in `build/host/doc`.
To build the standard library documentation, use `x doc --stage 0 library --open`.
To build the documentation for a book (e.g. the unstable book), use `x doc src/doc/unstable-book.`
Results should appear in `build/host/doc`, as well as automatically open in your default browser.
See [Building Documentation](./building/compiler-documenting.md#building-documentation) for more
information.

[docs]: https://doc.rust-lang.org

Expand Down

0 comments on commit 3d8d66c

Please sign in to comment.