Merge pull request #106 from aormsby/PR-BugFix-RemoveEmptyListDateDisplay

Bug Fix to prevent incorrect default Date display in List layout
This commit is contained in:
Radek Kozieł 2019-11-10 09:20:58 +01:00 committed by GitHub
commit 73b4c48dcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,9 +13,11 @@
<div class="post on-list"> <div class="post on-list">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1> <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<div class="post-meta"> <div class="post-meta">
<span class="post-date"> {{ if .Date }}
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }} <span class="post-date">
</span> {{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
</span>
{{ end }}
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }} {{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span>{{ end }}
{{ if $.Site.Params.ShowReadingTime }} {{ if $.Site.Params.ShowReadingTime }}
<span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span> <span class="post-read-time">— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span>