Skip to content

docs: add pagetoc support for The Cargo Book #15852

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

We've already saw rustc and rustc-dev-guide adopting this. Since The Cargo Book is more like a reference manual, so would largely benefit from the toc on page.

Ref: rust-lang/rust#140113.

How to test and review this PR?

mdbook serve src/doc

I didn't make it for contrib doc because that one doesn't have long one page docs, and I hope the feature will eventually upstream into mdbook 😆.

Some screenshots

image
image
image
image

We've already saw rustc and rustc-dev-guide adopting this.
Since The Cargo Book is more like a reference manual,
so would largely benefit from the toc on page.

Ref: <rust-lang/rust#140113>.
@rustbot
Copy link
Collaborator

rustbot commented Aug 17, 2025

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 17, 2025
@weihanglo
Copy link
Member Author

r? ehuss

as you're the mdbook maintainer :)

@rustbot rustbot assigned ehuss and unassigned epage Aug 17, 2025
@weihanglo
Copy link
Member Author

Also during this I found in Semver compatibility chapter some sections have smaller headers. Not sure if it is intentional.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants