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: fix nesting of next sections under examples #7159

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

edev
Copy link
Contributor

@edev edev commented Feb 15, 2025

Promote the "Feature flags" and "Supported platforms" sections out from under "Examples", as they are not examples. Adjust their subsections accordingly. Expose these subsections via navigation sidebar.

Motivation

I believe the documentation subheadings under "Examples" might have been nested by mistake. It seems like they were meant to follow "Examples", and I suspect that no one noticed this mistake because the default page styling makes the nesting structure hard to see.

This matters for at least two reasons:

  1. Accessibility, e.g. to users of screen readers.
  2. The "Sections" navigation menu in the sidebar only renders # and ## headings. The headings "Unstable features", "WASM support", and "Unstable WASM support" are absent from this menu, and I believe they were meant to be present.

Solution

Promote each subsection under Examples by one level.

Promote the feature flags and supported platforms sections out from
under examples, as they are not examples. Adjust their subsections
accordingly. Expose these subsections via navigation sidebar.
@maminrayej maminrayej added T-docs Topic: documentation A-tokio Area: The main tokio crate labels Feb 15, 2025
@maminrayej
Copy link
Member

maminrayej commented Feb 15, 2025

Using heading level 2 for "Feature flags" and "Supported platforms" is consistent with "Working With Tasks", "CPU-bound tasks and blocking code", and "Asynchronous IO". I guess "Examples" is using heading level 1 since it's an overall example of using tokio.

Copy link
Contributor

@Darksonn Darksonn 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 those are part of the "tour of Tokio"

scr

This layout makes sense to me, thanks.

@Darksonn Darksonn merged commit 67c343d into tokio-rs:master Feb 15, 2025
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants