[i18n-localize-dates-hugo-0.87] Improve date localization and bump Hugo version to 0.87 to support the new Date.Format. Ref https://gohugo.io/functions/dateformat/
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
{{- $scratch := newScratch }}
|
||||
|
||||
{{- if not .Date.IsZero -}}
|
||||
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
|
||||
<span class="date">
|
||||
{{ .Date | time.Format (default ":date_long" site.Params.DateFormat)}}
|
||||
</span>
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowReadingTime") -}}
|
||||
|
Reference in New Issue
Block a user