Skip to content
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

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jul 9, 2023

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.

@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2023

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 9, 2023
Copy link
Member

@weihanglo weihanglo left a 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

@rustbot rustbot added the A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. label Jul 12, 2023
Copy link
Member

@weihanglo weihanglo left a 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?

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 12, 2023

📌 Commit a181267 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 12, 2023
@bors
Copy link
Collaborator

bors commented Jul 12, 2023

⌛ Testing commit a181267 with merge ee100cc...

@bors
Copy link
Collaborator

bors commented Jul 12, 2023

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing ee100cc to master...

@ehuss
Copy link
Contributor Author

ehuss commented Jul 12, 2023

Sorry, I was going to comment here. The rust-lang/rust repo is already updated, so there shouldn't be anything that is needed.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2023
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
@ehuss ehuss added this to the 1.73.0 milestone Jul 30, 2023
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 A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants