mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-24 21:20:17 +01:00
layouts: Improve usage of datetime
Use the date format from the config, and print it in a time tag. See: https://golang.org/pkg/time/
This commit is contained in:
parent
8b7d70e3c0
commit
f76b5a069a
@ -1,6 +1,6 @@
|
|||||||
<div class="blog-post">
|
<div class="blog-post">
|
||||||
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
|
<h2 class="blog-post-title"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h2>
|
||||||
<p class="blog-post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} by <a href="#">Mark</a></p>
|
<p class="blog-post-meta"><time datetime="{{ .Date }}">{{ .Date.Format .Site.Params.date_format }}</time> by <a href="#">Mark</a></p>
|
||||||
{{ .Summary }}
|
{{ .Summary }}
|
||||||
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
|
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
|
||||||
</div> <!-- /.blog-post -->
|
</div> <!-- /.blog-post -->
|
||||||
|
Loading…
Reference in New Issue
Block a user