Skip to content

Commit

Permalink
🩹 Fix .Lastmod shown when same as .Date
Browse files Browse the repository at this point in the history
  • Loading branch information
jpanther committed Feb 13, 2022
1 parent e9f5908 commit a041f09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/article-meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down

0 comments on commit a041f09

Please sign in to comment.