Skip to content

Commit

Permalink
Use hugo 0.87's date formatting feature with time.Format (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saxodwarf authored Dec 26, 2021
1 parent 4e2558d commit c59193f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $scratch := newScratch }}

{{- 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 }}

{{- if (.Param "ShowReadingTime") -}}
Expand Down

0 comments on commit c59193f

Please sign in to comment.