layouts/_default/single.html, README.md: add showWordCount option
This commit is contained in:
parent
ae454bef38
commit
13ca81158d
2 changed files with 15 additions and 1 deletions
|
@ -16,7 +16,10 @@
|
|||
<span class="post-author">{{ . }}</span>
|
||||
{{- end -}}
|
||||
{{- if and (.Param "readingTime") (eq (.Param "readingTime") true) -}}
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
||||
<span class="post-reading-time">{{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }}</span>
|
||||
{{- end -}}
|
||||
{{- if and (.Param "showWordCount") (eq (.Param "readingTime") true) -}}
|
||||
<span class="post-word-count">{{ .WordCount }} {{ $.Site.Params.words | default "words" }}</span>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue