x/pkgsite: navigation bar loses heading structure from README #43325
What is the URL of the page with the issue?
What is your user agent?
Compare to the
What did you do?
Examine the headings on the left navigation bar.
What did you expect to see?
A clear distinction between topics (
What did you see instead?
The text was updated successfully, but these errors were encountered:
Thanks for the feedback!
We decided to flatten the hierarchy because users like to do a lot of different things with their README headings.
We currently show the highest and second highest levels in the TOC for the README section.
If you have suggestions on how to better surface this information, let us know!
I agree that it does make sense to compress the observed heading range and prune out levels that appear to be too fine-grained.
But, rather than flattening the levels that are included, I would like them to be visually distinct in some manner. That could be implemented as different indentation levels, different background colors, different font weights and sizes, or perhaps some other mechanism — the important thing is that they be distinct in some easily-observable way.
For skip-levels in general, I agree that showing the highest 1–2 levels in the ToC seems reasonable.
I have a few other suggestions for that heuristic, but in my opinion none of these suggestions is as important as making the heading levels visually distinct.