commit 855855cd609d9d5808e839837954cd868a44c6cd
parent 0e14937d311b8424b9185877ecfeea9255a1b5e1
Author: panr <radoslaw.koziel@gmail.com>
Date: Mon, 24 Oct 2022 16:31:41 +0200
Fix .Lastmod context
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/layouts/_default/index.html b/layouts/_default/index.html
@@ -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>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -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 }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -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 }}