From dbe75271ff3ddfe5eaf425ef21cf6f52ca2819a9 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:57:01 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20article=20update=20date=20?= =?UTF-8?q?not=20using=20formatted=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #259 --- 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 d0a7757f..09ccbb7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Upgrade to Tailwind v3.1.8 ([#265](https://github.com/jpanther/congo/pull/265)) - Upgrade to Mermaid v9.1.5 ([#272](https://github.com/jpanther/congo/pull/272)) +### Fixed + +- Article updated date logic doesn't consider formatted date values ([#259](https://github.com/jpanther/congo/issues/259)) + ## [2.3.1] - 2022-07-30 ### Added diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html index 7984fa8e..7b397796 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 and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne .Date .Lastmod) }} + {{ if and (.Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false)) (ne (partial "functions/date.html" .Date) (partial "functions/date.html" .Lastmod)) }} {{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }} {{ end }}