From 9e5d3f7758fd944a104777354c6e1bfc4ca1902b Mon Sep 17 00:00:00 2001 From: sculptor189 Date: Fri, 16 Aug 2024 19:51:30 -0400 Subject: [PATCH] avoid showing incorrect lastmod "0001-01-01" --- layouts/partials/article-meta/basic.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 40d12d53..2bfcd25d 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -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 @@ {{ end }} -{{ end }} \ No newline at end of file +{{ end }}