add time threshold (1 hr) for last mod display

This commit is contained in:
Adam Ormsby 2019-12-17 11:20:41 +07:00
parent 211e002ab6
commit 285e9e879a

View File

@ -1,4 +1,6 @@
{{ if gt .Lastmod .Date }}
{{$hourInSec := 3600}}}
{{ if gt .Lastmod (add (time .Date).Unix $hourInSec) }}
{{ with .Lastmod }}
<span class="post-moddate">
({{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})