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

Generate uniform <h1> headings for all modules #287

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

jonathanhefner
Copy link
Member

In #223, we began generating default <h1> headings for modules. However, these headings were only generated for modules that had a description. If a module had no comment to begin with, it would not get a generated heading.

Furthermore, since #280, each module's full name has been prominently displayed at the top of its page. These names are visually redundant with generated headings, which also use the full name.

To unify the design and ensure that all modules have an <h1>, this commit converts each module's full name into an <h1> heading inside an <hgroup>, and uses postprocessing to pull any comment-based <h1> into the <hgroup>.

This commit also renames the "Included Modules" section to "Inherits From", and moves any listed base class from the top of the page to the top of that section. This change focuses the <h1>, both visually and from an SEO perspective.

Before After
before1 after1
before2 after2
before3 after3
before4 after4
before5 after5 (same)

In 60e05b5, we began generating default
`<h1>` headings for modules.  However, these headings were only
generated for modules that had a description.  If a module had no
comment to begin with, it would not get a generated heading.

Furthermore, since c17deff, each
module's full name has been prominently displayed at the top of its
page.  These names are visually redundant with generated headings, which
also use the full name.

To unify the design and ensure that all modules have an `<h1>`, this
commit converts each module's full name into an `<h1>` heading inside an
`<hgroup>`, and uses postprocessing to pull any comment-based `<h1>`
into the `<hgroup>`.

This commit also renames the "Included Modules" section to "Inherits
From", and moves any listed base class from the top of the page to the
top of that section.  This change focuses the `<h1>`, both visually and
from an SEO perspective.
@jonathanhefner jonathanhefner merged commit c5a3294 into rails:main Aug 28, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant