From 41df0128d69b344050ef12f2dcd884e635a3299f Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 31 May 2022 09:35:31 +0200 Subject: Add tagging support --- layouts/partials/post-meta/date.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'layouts/partials/post-meta') diff --git a/layouts/partials/post-meta/date.html b/layouts/partials/post-meta/date.html index 04a814a..e5626cf 100644 --- a/layouts/partials/post-meta/date.html +++ b/layouts/partials/post-meta/date.html @@ -1,11 +1,14 @@ -{{ if not .Date.IsZero }} - +{{ $date := .Date | time.Format (site.Params.dateformat | default "January 02, 2006") }} +{{ $lastmod := .Lastmod | time.Format (site.Params.dateformat | default "January 02, 2006") }} + + - {{ if ne .Date .Lastmod }} - - {{ end }} +{{/* Check that lastmod exists and is greater than date + (i.e. the last modified date must be after the publish date) */}} +{{ if and (ne $lastmod $date) (gt .Lastmod .Date) }} + {{ end }} -- cgit v1.2.3