diff --git a/README.md b/README.md index 79532479..fa48e395 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,7 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man |:-------------------- | ------------------ | ---------------- | | title | string | N/A | | date | date | N/A | +| lastmod | date | N/A | | description | string | N/A | | keywords | array of strings | yes | | introDescription | string | yes | diff --git a/i18n/en.toml b/i18n/en.toml index a70d8069..71aaa106 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -55,6 +55,9 @@ other = "{{ .ReadingTime }} min read" [series_posts] other = "Posts in this series" +[last_update] +other = "updated" + # search [quick_links] other = "Results" diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index e46eb0e8..51a834dc 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -11,6 +11,9 @@ {{ partial "sprite" (dict "icon" "calendar") }} {{ .Date.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) -}} + {{ if ne .Date .Lastmod}} + {{ T "last_update" . }} {{ .Lastmod.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) -}} + {{ end}} {{- $scratch.Set "writeSeparator" true }} {{- end }}