single, fix word count and read time, while also making it respect the params in config file.

This commit is contained in:
me committed 2026-11-14 05:02:46 -07:00
1 parent 2da7ee102b
commit 5c37a13002
1 file changed
+6 -2
+6 -2
View File
@@ -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>