ruby / ruby/rdoc

Wrong heading levels in generated HTML?

Open
#1,822 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

Aliki format for class/module has H1 element for title, and H3 elements for boiler-plate sections "Constants,", "Public Class Methods," etc.

This means that when the last heading in the (human-written) class/module doc is H2 (say, titled "Foo"), the right-side "On This Page" section will make it appear the boiler-plate elements are subordinate to the "Foo" section.

See, for example, https://docs.ruby-lang.org/en/master/Integer.html, wherein the H2 section "What's Here" seems to contain sections "Constants" etc.

I think the boiler-plate sections should be H2, and thereby subordinate only to the H1 title.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the generated HTML for an Aliki class or module like Integer, then inspect the heading-generation entry point for boiler-plate sections such as Constants and Public Class Methods. Compare the result with the human-written H2 sections and the On This Page navigation. Done means those boiler-plate sections are H2 elements subordinate only to the H1 title, with the navigation reflecting that hierarchy.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.