Skip to content

Commit

Permalink
feat(seo): shift h1 tag from logo to discussion title (#3724)
Browse files Browse the repository at this point in the history
* feat(seo): shift h1 tag from logo to discussion title

Many times have we seen opponents of using h2 as the discussion title. Although
my own SEO knowledge is limited, I have seen the importance of structuring pages
according to the content you wish to prioritize. If we only take that into consideration
there is zero reason for the app-wide identical logo to take precedence over any
other heading.

This change makes the logo a standard (visually identical) element, and
makes the discussion hero title a h1.

* feat(seo): rewrite remainder of hero titles and subtitles
  • Loading branch information
luceos authored Feb 11, 2023
1 parent dea0a23 commit b43a009
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/src/forum/components/TagHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export default class TagHero extends Component {
>
<div className="container">
<div className="containerNarrow">
<h2 className="Hero-title">
<h1 className="Hero-title">
{tag.icon() && tagIcon(tag, {}, { useColor: false })} {tag.name()}
</h2>
</h1>
<div className="Hero-subtitle">{tag.description()}</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion views/frontend/content/tag.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@inject('url', 'Flarum\Http\UrlGenerator')

<div class="container">
<h2>{{ $tag->name }}</h2>
<h1>{{ $tag->name }}</h1>
<p>{{ $tag->description }}</p>

<ul>
Expand Down
2 changes: 1 addition & 1 deletion views/frontend/content/tags.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@inject('url', 'Flarum\Http\UrlGenerator')

<div class="container">
<h2>{{ $translator->trans('flarum-tags.forum.index.tags_link') }}</h2>
<h1>{{ $translator->trans('flarum-tags.forum.index.tags_link') }}</h1>

@foreach ([$primaryTags, $secondaryTags] as $category)
<ul>
Expand Down

0 comments on commit b43a009

Please sign in to comment.