single, fix word count and read time, while also making it respect the params in config file.
This commit is contained in:
1 parent
2da7ee102b
commit
5c37a13002
1 file changed
+6
-2
@@ -3,11 +3,13 @@
|
||||
|
||||
<div class="post-info">
|
||||
<p>
|
||||
{{- if (.Param "ShowReadingTime") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock">
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
<polyline points="12 6 12 12 16 14"></polyline>
|
||||
</svg>
|
||||
{{ i18n "readingTime" .Page.ReadingTime }}
|
||||
<span>{{ printf "%s" (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime)) }}</span>
|
||||
{{- end -}}
|
||||
|
||||
{{ if .IsTranslated }} | {{ i18n "postAvailable" }}
|
||||
{{ range .Translations }}
|
||||
@@ -83,12 +85,14 @@
|
||||
{{ partial "series.html" . }}
|
||||
{{ partial "categories.html" . }}
|
||||
|
||||
{{- if (.Param "ShowWordCount") -}}
|
||||
<p>
|
||||
<img style="display: inline-block; vertical-align: middle; margin-right: 4px;"
|
||||
src="/feathericons/16px-a9a9b3/file-text.svg" alt="Word Count:" title="Word Count"
|
||||
>
|
||||
{{ i18n "wordCount" .Page.WordCount }}
|
||||
{{ printf "%s" (i18n "words" .WordCount | default (printf "%d words" .WordCount)) }}
|
||||
</p>
|
||||
{{- end -}}
|
||||
|
||||
{{ if .Params.Started }}
|
||||
<p>
|
||||
|
||||
Reference in new issue
Block a user