Only show updated at when the published data is different

This commit is contained in:
Adriano Caloiaro 2023-07-20 19:31:16 -06:00
parent b3b6b8de1b
commit 7845178336
No known key found for this signature in database
GPG key ID: C2BC56DE73CE3F75

View file

@ -9,7 +9,9 @@
{{- .Date.Format "2006-01-02" -}}
 
{{- if $.Site.Params.showLastUpdated -}}
[{{- or $.Site.Params.updatedDatePrefix "Updated" -}} :: {{- .Lastmod.Format "2006-01-02" -}}]
{{- if not (eq .Lastmod .Date) -}}
[{{- or $.Site.Params.updatedDatePrefix "Updated" -}} :: {{- .Lastmod.Format "2006-01-02" -}}]
{{- end -}}
{{- end -}}
</time>
{{- end -}}