layouts/_default/single.html: allow per-page showWordCount opt-out

This commit is contained in:
revsuine 2024-11-25 02:56:20 +00:00
parent 2a6278396c
commit fa3123d2a6
Signed by: revsuine
GPG key ID: 3F257B68F5BC9339

View file

@ -18,7 +18,7 @@
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }}</span>
{{- end -}}
{{- if and (.Param "showWordCount") (eq (.Param "showWordCount") true) -}}
{{- if and (.Params.showWordCount | default .Site.Params.showWordCount) (eq (.Param "showWordCount") true) -}}
<span class="post-word-count">{{ .WordCount }} {{ $.Site.Params.words | default "words" }}</span>
{{- end -}}
</div>