🩹 Fix `.Lastmod` shown when same as `.Date`

pull/144/head
James Panther 2022-02-13 17:44:30 +11:00
parent e9f59082de
commit a041f09f6f
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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 }}