Merge pull request #1694 from sculptor189/lastmod-dev

Avoid showing incorrect lastmod "0001-01-01"
This commit is contained in:
Nuno Coração 2024-08-28 12:46:21 +01:00 committed by GitHub
commit 2be439622b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@
{{ end }}
{{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) }}
"functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) (gt (.Lastmod | time.Format "2006") 1) }}
{{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }}
{{ end }}
@ -96,4 +96,4 @@
</div>
{{ end }}
{{ end }}
{{ end }}