allow setting ShowReadingTime per-page
as well as site-wide
This commit is contained in:
parent
bc4d4153dc
commit
f7dbf75d5b
|
@ -13,7 +13,7 @@
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
{{- partial "post_meta.html" . -}}
|
{{- partial "post_meta.html" . -}}
|
||||||
{{- if .IsTranslated -}}
|
{{- if .IsTranslated -}}
|
||||||
{{- if or .Params.author $.Site.Params.author $.Site.Params.ShowReadingTime (not .Date.IsZero) }} | {{- end -}}
|
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||||
<ul class="i18n_list">
|
<ul class="i18n_list">
|
||||||
{{- i18n "translations" | default "Translations"}}:
|
{{- i18n "translations" | default "Translations"}}:
|
||||||
{{- range .Translations }}
|
{{- range .Translations }}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }}
|
{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if $.Site.Params.ShowReadingTime -}}
|
{{- if (.Param "ShowReadingTime") -}}
|
||||||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
|
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue