1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-20 01:22:19 +01:00

Use H1 headers in <article> sections

Headers are a semantic element that help computers understand the
content. In general, header tags should follow rank order, but the
most important is that the first header inside a section will serve
as the title in a table of contents, etc, but since article sections
stand alone as independent documents, I like the idea of explicitly
starting with H1 tags.

See: http://diveinto.html5doctor.com/semantics.html
This commit is contained in:
Alan Orth 2016-09-02 10:12:36 +03:00
parent 54ba5518d2
commit 1f0799b9f1
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
{{ define "main" }}
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
<h1 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
<p class="blog-post-meta"><time datetime="{{ .Date }}">{{ .Date.Format .Site.Params.date_format }}</time> by <a href="#">{{ .Params.author | default .Site.Params.author }}</a></p>
</header>
{{ .Content }}

View File

@ -1,6 +1,6 @@
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
<h1 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
<p class="blog-post-meta"><time datetime="{{ .Date }}">{{ .Date.Format .Site.Params.date_format }}</time> by <a href="#">{{ .Params.author | default .Site.Params.author }}</a></p>
</header>
{{ .Summary }}