Fix list date shown as 0001-01-01 when not set

This commit is contained in:
Gabe Cook 2022-06-30 19:27:28 -05:00
parent aad3300fb5
commit d7e289572a
No known key found for this signature in database
GPG Key ID: 3197318BDE319B8D
2 changed files with 6 additions and 2 deletions

View File

@ -20,9 +20,11 @@
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- with .Date }}
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
{{ .Format "2006-01-02" }}
</span>
{{- end }}
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
{{ end }}

View File

@ -11,9 +11,11 @@
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- with .Date }}
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
{{ .Format "2006-01-02" }}
</span>
{{- end }}
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
{{ end }}