Skip to content

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Nov 22, 2025

@ehuss ehuss added the not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. label Nov 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 22, 2025

r? @Urgau

rustbot has assigned @Urgau.
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

@Urgau
Copy link
Member

Urgau commented Nov 22, 2025

The new sidebar is really nice. Exciting to use it in other places.

Regarding that sidebar, I noticed that it doesn't take into account Level 1 heading, is that expected? should we update all the RFCs to reduce the heading by one?

We are missing the Summary, Motivation, ... headings on all RFCs.

image

@ehuss
Copy link
Contributor Author

ehuss commented Nov 28, 2025

Hm, that's a good point. Yea, it is expected as mdbook expects a chapter to have only one level-1 heading (usually the chapter title at the top).

At the risk of causing complete chaos, I pushed a commit that corrects the heading levels. Pages generally shouldn't have multiple h1 headings anyways.

@Urgau
Copy link
Member

Urgau commented Nov 28, 2025

I'm fine updating all the headings.

However we should also update the level of all the other headings (h2 -> h3, h3 -> h4, ...), otherwise the sections no longer have the right parent.

Your patch Expected output
image image

This increases the heading level so that RFCs do not contain multiple
level-1 headings. mdbook expects that chapters have only a single
level-1 heading (and that usually should be at the very top). More than
one h1 element on a page is generally not recommended (for example,
https://www.a11yproject.com/posts/how-to-accessible-heading-structure/#one-h1).
@ehuss
Copy link
Contributor Author

ehuss commented Nov 29, 2025

Well shoot. I thought my replacements handled that. I have re-pushed the commit which should fix that. I ended up using pulldown-cmark to more accurately detect the headings. Unfortunately a large number of RFCs had weird heading levels. So I went through manually visually inspected each RFC to see if the nesting looked odd and fixed any RFC that looked weird (that was maybe 10-15% of them).

Copy link
Member

@Urgau Urgau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. Looks good to me.

@Urgau Urgau merged commit cc15726 into rust-lang:master Nov 29, 2025
ehuss added a commit to ehuss/rfcs that referenced this pull request Dec 4, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
ehuss added a commit to ehuss/rfcs that referenced this pull request Dec 4, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
ehuss added a commit to ehuss/rfcs that referenced this pull request Dec 4, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
ehuss added a commit that referenced this pull request Dec 11, 2025
Updated section headers to use Markdown 2nd level headings. As part of #3883 we switched the template to not use level-1 headings.

r? Turbo87
davidtwco pushed a commit to davidtwco/rfcs that referenced this pull request Dec 12, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
davidtwco pushed a commit to davidtwco/rfcs that referenced this pull request Dec 12, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
davidtwco pushed a commit to davidtwco/rfcs that referenced this pull request Dec 12, 2025
As part of rust-lang#3883, we have switched
the template to stop using level-1 headings which isn't the way mdbook
is intended to be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants