1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-25 03:34:29 +01:00

layouts/post/summary.html: Rework author name display

Use author name from frontmatter if it exists, otherwise use the
author from the site config.
This commit is contained in:
Alan Orth 2016-08-30 12:31:32 +03:00
parent 8a0716d236
commit 0e54dba17a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -1,6 +1,6 @@
<article class="blog-post">
<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="#">{{ .Site.Params.author }}</a></p>
<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>
{{ .Summary }}
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
</article> <!-- /.blog-post -->