1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-11-24 21:20:17 +01:00

Use HTML5 <header> tags in articles

The HTML5 <article> tag represents a complete, or self-contained,
composition in a document. Headers are a semantic HTML5 element
that helps computers understand the content.
This commit is contained in:
Alan Orth 2016-09-02 10:09:17 +03:00
parent 9b9226ca99
commit 54ba5518d2
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,10 @@
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
{{ define "main" }}
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
<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 }}
</article> <!-- /.blog-post -->
{{ end }}

View File

@ -1,6 +1,8 @@
<article class="blog-post">
<header>
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
<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 }}
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
</article> <!-- /.blog-post -->