Add article last updated date support

(Ref: #43)
This commit is contained in:
James Panther
2021-12-18 10:07:38 +11:00
parent c7eb77e4ba
commit bf9d11d23a
4 changed files with 13 additions and 3 deletions
+7
View File
@@ -1,4 +1,11 @@
<time datetime="{{ .Date }}">
{{- .Date.Format .Site.Params.article.dateFormat | default "2 January 2006" -}}
</time>
{{ if .Params.showDateUpdated | default (.Site.Params.article.showDateUpdated | default false) }}
&nbsp;(Updated:&nbsp;
<time datetime="{{ .Lastmod }}">
{{- .Lastmod.Format .Site.Params.article.dateFormat | default "2 January 2006" -}}
</time>
)
{{ end }}
{{- /* Trim EOF */ -}}