-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
docs: Use heading attributes to control the fragment. #12339
Conversation
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need to upgrade mdbook to at least 0.4.30
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0430
15c9b84
to
a181267
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this.
Just one tidy question for @ehuss: Do we need to upgrade mdbook somewhere for Rust release process?
@bors r+ |
☀️ Test successful - checks-actions |
Sorry, I was going to comment here. The rust-lang/rust repo is already updated, so there shouldn't be anything that is needed. |
Update cargo 11 commits in 694a579566a9a1482b20aff8a68f0e4edd99bd28..1b15556767f4b78a64e868eedf4073c423f02b93 2023-07-11 22:28:29 +0000 to 2023-07-18 14:44:47 +0000 - Fix "cargo doc --open" crash on WSL2 (rust-lang/cargo#12373) - fix(git): respect scp-like URL for nested submodules (rust-lang/cargo#12359) - Upgrade to indexmap v2 (rust-lang/cargo#12368) - refactor: Clean up package metadata (rust-lang/cargo#12352) - Correct unspecifiead to unspecified (rust-lang/cargo#12363) - Replace invalid `panic_unwind` std feature with `panic-unwind` (rust-lang/cargo#12364) - Bump to 0.74.0; update changelog (rust-lang/cargo#12361) - Bump version of crates-io due to unintentional semver-breaking change (rust-lang/cargo#12357) - chore: Automatically update dependencies monthly (rust-lang/cargo#12341) - docs: Use heading attributes to control the fragment. (rust-lang/cargo#12339) - Rustfmt with latest nightly. (rust-lang/cargo#12351) r? ghost
mdBook recently gained the ability to use heading attributes which allows you to define the HTML id (and thus URL fragment) for a section. This is an improvement over using manual
id
tags since mdBook can now know which ID matches the section, and will automatically set up links and such.Some of these pages were using
id
tags to handle backwards-compat for old URLs. For those, I switched them to use redirects instead.One downside is that the links won't work in GitHub render previews. Overall I think the benefits are worth it, though.