add time threshold (1 hr) for last mod display
This commit is contained in:
parent
211e002ab6
commit
285e9e879a
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
||||||
{{ if gt .Lastmod .Date }}
|
{{$hourInSec := 3600}}}
|
||||||
|
|
||||||
|
{{ if gt .Lastmod (add (time .Date).Unix $hourInSec) }}
|
||||||
{{ with .Lastmod }}
|
{{ with .Lastmod }}
|
||||||
<span class="post-moddate">
|
<span class="post-moddate">
|
||||||
({{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})
|
({{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})
|
||||||
|
|
Loading…
Reference in a new issue