mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-21 23:35:08 +01:00
add time threshold (1 hr) for last mod display
This commit is contained in:
parent
211e002ab6
commit
285e9e879a
@ -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 New Issue
Block a user