Merge pull request #32 from MyIgel/fix-single-page-date

Hide date on single pages if not set
This commit is contained in:
Radek Kozieł 2019-02-05 18:35:28 +01:00 committed by GitHub
commit ff891dad96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,9 +2,11 @@
<div class="post">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<div class="post-meta">
{{ with .Date | default nil }}
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
{{ .Format "2006-01-02" }}
</span>
{{ end }}
{{ with .Params.Author }}<span class="post-author">— {{ $.Site.Params.WrittenBy }} {{ . }}</span>{{ end }}
</div>