From 96057eb09d2cff605b6974457cff170abd95b91d Mon Sep 17 00:00:00 2001 From: Djordje Atlialp Date: Sun, 6 Sep 2020 09:56:00 +0200 Subject: [PATCH] Fix last mod date --- layouts/posts/single.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/layouts/posts/single.html b/layouts/posts/single.html index b6c0c3d..631bb36 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -74,8 +74,21 @@ - {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .Date.Local }}{{ end }} - {{ if .LastMod }} ({{ i18n "lastModified" }}: {{ if .Site.Params.dateformNumTime }}{{ dateFormat .Site.Params.dateformNumTime .LastMod.Local }}{{ else }}{{ dateFormat "2006-01-02 15:04 -0700" .LastMod.Local }}){{ end }} + {{ if .Site.Params.dateformNumTime }} + {{ dateFormat .Site.Params.dateformNumTime .Date.Local }} + {{ else }} + {{ dateFormat "2006-01-02 15:04" .Date.Local }} + {{ end }} + + {{ if .Lastmod }} + {{ if not (eq .Lastmod .Date )}} + {{ if .Site.Params.dateformNumTime }} + ({{ i18n "lastModified" }}: {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local }}) + {{ else }} + ({{ i18n "lastModified" }}: {{ dateFormat "2006-01-02 15:04" .Lastmod.Local }}) + {{ end }} + {{ end }} + {{ end }}

{{- if .GitInfo }}