update post only as changed if the update was made on a different day

This commit is contained in:
Robert Kaussow 2020-08-25 23:55:40 +02:00
parent 536f5322f3
commit 6f107e2bcd
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61

View File

@ -25,7 +25,7 @@
<svg class="icon date"><use xlink:href="#date"></use></svg> <svg class="icon date"><use xlink:href="#date"></use></svg>
<span class="gblog-post__tag"> <span class="gblog-post__tag">
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if ne .Lastmod .Date }} {{ if ne (.Lastmod.Format "2006-01-02") (.Date.Format "2006-01-02") }}
Updated on Updated on
{{ end }} {{ end }}
{{ .Lastmod.Format "Jan 2, 2006" }} {{ .Lastmod.Format "Jan 2, 2006" }}