mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-29 22:15:19 -04:00
Add option to add word count to metadata (#740)
Usage: ShowWordCount: true
This commit is contained in:
parent
37f359ee21
commit
b0ab8ea495
8 changed files with 40 additions and 1 deletions
|
@ -8,6 +8,10 @@
|
|||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- if (.Param "ShowWordCount") -}}
|
||||
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
|
||||
{{- end }}
|
||||
|
||||
{{- with (partial "author.html" .) }}
|
||||
{{- $scratch.Add "meta" (slice .) }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue