diff --git a/i18n/de.yaml b/i18n/de.yaml index f64aad9..667fbd8 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -9,6 +9,9 @@ one: "1 Minute" other: "{{ .Count }} Minuten" +- id: lastmod + translation: "Zuletzt GeƤndert" + - id: words translation: one : "Wort" diff --git a/i18n/en.yaml b/i18n/en.yaml index 3a1e215..215ac7a 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -9,6 +9,9 @@ one : "1 min" other: "{{ .Count }} min" +- id: lastmod + translation: "Last modified" + - id: words translation: one : "word" diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index b0c0417..772b81b 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -8,6 +8,10 @@ {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} {{- end }} +{{- if and (.Param "Lastmod") (ne (.Param "Lastmod"| time.Format "2023-10-15") (.Date | time.Format "2023-10-15" )) }} +{{- $scratch.Add "meta" (slice (printf "%s: %s" (.Lastmod) (i18n "lastmod") (.Lastmod | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} +{{- end }} + {{- if (.Param "ShowWordCount") -}} {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} {{- end }}