Update to check if date is set in list and index.html

This commit is contained in:
anthony.buchholz 2022-08-20 17:44:17 -05:00
parent 1610962731
commit 0ab537e2ef
2 changed files with 10 additions and 6 deletions

View File

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

View File

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