mirror of
https://github.com/flarum/core.git
synced 2025-07-16 06:16:23 +02:00
feat(seo): shift h1 tag from logo to discussion title (#3724)
* 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
This commit is contained in:
@ -7,10 +7,10 @@ export default class AdminHeader extends Component {
|
||||
return [
|
||||
<div className={classList(['AdminHeader', this.attrs.className])}>
|
||||
<div className="container">
|
||||
<h2>
|
||||
<h1>
|
||||
{icon(this.attrs.icon)}
|
||||
{vnode.children}
|
||||
</h2>
|
||||
</h1>
|
||||
<div className="AdminHeader-description">{this.attrs.description}</div>
|
||||
</div>
|
||||
</div>,
|
||||
|
@ -82,7 +82,7 @@ export default class ExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionP
|
||||
{this.extension.icon ? icon(this.extension.icon.name) : ''}
|
||||
</span>
|
||||
<div className="ExtensionName">
|
||||
<h2>{this.extension.extra['flarum-extension'].title}</h2>
|
||||
<h1>{this.extension.extra['flarum-extension'].title}</h1>
|
||||
</div>
|
||||
<div className="ExtensionPage-headerTopItems">
|
||||
<ul>{listItems(this.topItems().toArray())}</ul>
|
||||
@ -115,7 +115,7 @@ export default class ExtensionPage<Attrs extends ExtensionPageAttrs = ExtensionP
|
||||
<div className="ExtensionPage-permissions">
|
||||
<div className="ExtensionPage-permissions-header">
|
||||
<div className="container">
|
||||
<h2 className="ExtensionTitle">{app.translator.trans('core.admin.extension.permissions_title')}</h2>
|
||||
<h1 className="ExtensionTitle">{app.translator.trans('core.admin.extension.permissions_title')}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div className="container">
|
||||
|
@ -34,7 +34,7 @@ export default class DiscussionHero extends Component {
|
||||
items.add('badges', <ul className="DiscussionHero-badges badges">{listItems(badges)}</ul>, 10);
|
||||
}
|
||||
|
||||
items.add('title', <h2 className="DiscussionHero-title">{discussion.title()}</h2>);
|
||||
items.add('title', <h1 className="DiscussionHero-title">{discussion.title()}</h1>);
|
||||
|
||||
return items;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ export default class UserCard extends Component {
|
||||
: ''}
|
||||
|
||||
<div className="UserCard-profile">
|
||||
<h2 className="UserCard-identity">
|
||||
<h1 className="UserCard-identity">
|
||||
{this.attrs.editable ? (
|
||||
[AvatarEditor.component({ user, className: 'UserCard-avatar' }), username(user)]
|
||||
) : (
|
||||
@ -58,7 +58,7 @@ export default class UserCard extends Component {
|
||||
{username(user)}
|
||||
</Link>
|
||||
)}
|
||||
</h2>
|
||||
</h1>
|
||||
|
||||
{badges.length ? <ul className="UserCard-badges badges">{listItems(badges)}</ul> : ''}
|
||||
|
||||
|
@ -39,7 +39,7 @@ export default class WelcomeHero extends Component<IWelcomeHeroAttrs> {
|
||||
/>
|
||||
|
||||
<div class="containerNarrow">
|
||||
<h2 class="Hero-title">{app.forum.attribute('welcomeTitle')}</h2>
|
||||
<h1 class="Hero-title">{app.forum.attribute('welcomeTitle')}</h1>
|
||||
<div class="Hero-subtitle">{m.trust(app.forum.attribute('welcomeMessage'))}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user