From a041f09f6f9aabccc85f8f3eeef84b59828080b1 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Sun, 13 Feb 2022 17:44:30 +1100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20`.Lastmod`=20shown=20when?= =?UTF-8?q?=20same=20as=20`.Date`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ layouts/partials/article-meta.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c72415e6..5fc760eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Updated date is displayed even when it is the same as published date + ## [2.0.4] - 2022-02-09 ### Changed diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html index ad3420ab..af02db40 100644 --- a/layouts/partials/article-meta.html +++ b/layouts/partials/article-meta.html @@ -16,7 +16,7 @@ {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }} {{ end }} - {{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }} + {{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne .Date .Lastmod) }} {{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }} {{ end }}