hugo-PaperMod/layouts/partials/post_meta.html
Aditya Telange 16213a37e5
post-meta: improvements
- hide zero date (closes #33)
- fix separator
- refactor
2020-10-22 20:40:00 +05:30

12 lines
412 B
HTML

{{- if not .Date.IsZero -}}
<time>{{- .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>&nbsp;·&nbsp;
{{- end -}}
{{- if $.Site.Params.ShowReadingTime -}}
{{- i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime) }}&nbsp;·&nbsp;
{{- end -}}
{{- if or .Params.author .Site.Params.author }}
{{- printf "%s" (.Params.author | default .Site.Params.author) }}
{{- end -}}