diff options
| author | Saxodwarf <40502346+Saxodwarf@users.noreply.github.com> | 2021-12-26 09:22:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-26 13:52:10 +0530 |
| commit | c59193fc48c104389d8b3e9e6857c7aa46221a92 (patch) | |
| tree | 963e4c548b3e400ea182e6ea7ffb8ae0118886c8 | |
| parent | 4e2558d93c59c3229d2b856c164b66e1e2580df9 (diff) | |
Use hugo 0.87's date formatting feature with time.Format (#555)
| -rw-r--r-- | layouts/partials/post_meta.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 4f86d4a..9225f13 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -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") -}} |
