mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-13 14:44:28 -04:00
Handle when Date is equal to Lastmod
This commit is contained in:
parent
b1881f00f5
commit
c7e471f466
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
|
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if not .Lastmod.IsZero -}}
|
{{- if and (not .Lastmod.IsZero) (not (eq .Date .Lastmod)) -}}
|
||||||
{{- $scratch.Add "meta" (slice (printf "<span title='Last updated %s'>Last updated on %s</span>" (.Lastmod) (.Lastmod | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }}
|
{{- $scratch.Add "meta" (slice (printf "<span title='Last updated %s'>Last updated on %s</span>" (.Lastmod) (.Lastmod | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue