mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-14 12:25:07 +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 }}
|
||||
<span class="post-moddate">
|
||||
({{ $.Site.Params.LastModDisplay }} {{ .Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }})
|
||||
|
Loading…
Reference in New Issue
Block a user