Skip to content

Generate uniform <h1> headings for all modules#287

Merged
jonathanhefner merged 1 commit into
rails:mainfrom
jonathanhefner:h1-unify
Aug 28, 2023
Merged

Generate uniform <h1> headings for all modules#287
jonathanhefner merged 1 commit into
rails:mainfrom
jonathanhefner:h1-unify

Conversation

@jonathanhefner
Copy link
Copy Markdown
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.
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