diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b7497255..d7e3d136 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -19,6 +19,9 @@ {{- partial "edit_post.html" . -}} {{- partial "post_canonical.html" . -}} +
+ {{- partial "post_lastmod.html" . -}} +
{{- end }} {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }} diff --git a/layouts/partials/post_lastmod.html b/layouts/partials/post_lastmod.html new file mode 100644 index 00000000..750ff217 --- /dev/null +++ b/layouts/partials/post_lastmod.html @@ -0,0 +1,6 @@ +{{ $date := .Date.Format "02.01.2006" }} +{{ $lastmod := .Lastmod.Format "02.01.2006" }} + +{{- if ne $lastmod $date -}} +Last updated on {{ .Lastmod | time.Format (default "January 2, 2006" site.Params.DateFormat) }} +{{- end }} \ No newline at end of file