Fix .Lastmod context

This commit is contained in:
panr 2022-10-24 16:31:41 +02:00
parent 0e14937d31
commit 855855cd60
3 changed files with 7 additions and 7 deletions

View File

@ -21,13 +21,13 @@
</h1>
<div class="post-meta">
{{ with .Date }}
{{ if .Date }}
<time class="post-date">
{{ .Format "2006-01-02" }}
{{ .Date.Format "2006-01-02" }} ::
</time>
{{ end }}
{{ with .Params.Author }}
<span class="post-author">:: {{ . }}</span>
<span class="post-author">{{ . }}</span>
{{ end }}
</div>

View File

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

View File

@ -4,9 +4,9 @@
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{ with .Date }}
{{ if .Date }}
<time class="post-date">
{{ .Format "2006-01-02" }} ::
{{ .Date.Format "2006-01-02" }} ::
{{ if $.Site.Params.showLastUpdated }}
[{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
{{ end }}