summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/list.html3
-rw-r--r--layouts/_default/single.html4
2 files changed, 5 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index c0016be..0dd7286 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -51,7 +51,8 @@
<footer class="entry-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{ if $.Site.Params.ShowReadingTime }} .
- {{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}{{ end }}
+ {{ $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 }}
</footer>
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 27c79d0..b104c5f 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -10,7 +10,9 @@
<div class="post-meta">
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
- {{ if $.Site.Params.ShowReadingTime }} . {{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}{{ end }}
+ {{ if $.Site.Params.ShowReadingTime }} .
+ {{ $default_txt := print .ReadingTime " " "min" }}
+ {{ i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
</div>
{{end}}
</header>