mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Use hugo 0.87's date formatting feature with time.Format (#555)
This commit is contained in:
parent
4e2558d93c
commit
c59193fc48
@ -1,7 +1,7 @@
|
|||||||
{{- $scratch := newScratch }}
|
{{- $scratch := newScratch }}
|
||||||
|
|
||||||
{{- if not .Date.IsZero -}}
|
{{- if not .Date.IsZero -}}
|
||||||
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date.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 (.Param "ShowReadingTime") -}}
|
{{- if (.Param "ShowReadingTime") -}}
|
||||||
|
Loading…
Reference in New Issue
Block a user