From c9bb4b0b6314d6d40a896e68ebfacff9df92c87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Bele=C3=B1a?= Date: Sun, 23 Jan 2022 20:28:50 +0100 Subject: [PATCH] :lipstick: Adjust metadata output --- layouts/partials/article-meta.html | 6 +++++- layouts/partials/meta/date-updated.html | 3 +++ layouts/partials/meta/date.html | 11 ++--------- 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 layouts/partials/meta/date-updated.html diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html index ea87e653..ed0eca75 100644 --- a/layouts/partials/article-meta.html +++ b/layouts/partials/article-meta.html @@ -13,7 +13,11 @@ {{/* Gather partials for this context */}} {{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }} - {{ $meta.Add "partials" (slice (partial "meta/date.html" .)) }} + {{ $meta.Add "partials" (slice (partial "meta/date.html" .Date)) }} + {{ end }} + + {{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }} + {{ $meta.Add "partials" (slice (partial "meta/date-updated.html" .Lastmod)) }} {{ end }} {{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default false)) (ne .WordCount 0) }} diff --git a/layouts/partials/meta/date-updated.html b/layouts/partials/meta/date-updated.html new file mode 100644 index 00000000..367486f4 --- /dev/null +++ b/layouts/partials/meta/date-updated.html @@ -0,0 +1,3 @@ +{{- i18n "article.updated" -}}:  +{{ partial "meta/date.html" . }} +{{- /* Trim EOF */ -}} diff --git a/layouts/partials/meta/date.html b/layouts/partials/meta/date.html index 92c2675b..c6687972 100644 --- a/layouts/partials/meta/date.html +++ b/layouts/partials/meta/date.html @@ -1,11 +1,4 @@ -