From 248437760d03ca18ed2c4b04a3e63a6d37f9767f Mon Sep 17 00:00:00 2001 From: Fundor333 Date: Sun, 18 Jan 2026 23:58:06 +0100 Subject: [PATCH] Fix date --- layouts/_default/single.html | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e26f062c..93a466ba 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,15 +20,19 @@ {{ . | time.Format $configDateFormat }} | {{ end -}} - {{ $published := .PublishDate | time.Format ":date_medium" }} - {{ $modified := .Lastmod | time.Format ":date_medium" }} - {{ if ne $published $modified }} - {{- with .Lastmod }} - {{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }} - - | + {{ $published := .PublishDate }} + {{ $modified := .GitInfo.AuthorDate }} + {{ if ge $modified $published }} + {{ $published := .PublishDate | time.Format ":date_medium" }} + {{ $modified := .Lastmod | time.Format ":date_medium" }} + {{ if ne $published $modified }} + {{- with .Lastmod }} + {{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }} + + | + {{ end -}} {{ end -}} {{ end -}} Reading time {{.ReadingTime}} minutes |