mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-21 18:11:37 +01:00
post-meta: improvements
- hide zero date (closes #33) - fix separator - refactor
This commit is contained in:
parent
684cb2160f
commit
16213a37e5
@ -1,5 +1,11 @@
|
||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime -}} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<time>{{- .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time> ·
|
||||
{{- end -}}
|
||||
|
||||
{{- if $.Site.Params.ShowReadingTime -}}
|
||||
{{- i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime) }} ·
|
||||
{{- end -}}
|
||||
|
||||
{{- if or .Params.author .Site.Params.author }}
|
||||
{{- printf "%s" (.Params.author | default .Site.Params.author) }}
|
||||
{{- end -}}
|
||||
|
Loading…
Reference in New Issue
Block a user