Add word count to page meta

This commit is contained in:
wizardbyron
2021-12-16 17:37:46 +08:00
committed by James Panther
parent 24ce98d1f2
commit 65a7228bfc
5 changed files with 12 additions and 0 deletions
+4
View File
@@ -16,6 +16,10 @@
{{ $meta.Add "partials" (slice (partial "meta/date.html" .)) }}
{{ end }}
{{ if and (.Params.showWordCount | default (.Site.Params.article.showWordCount | default true)) (ne .WordCount 0) }}
{{ $meta.Add "partials" (slice (partial "meta/word-count.html" .)) }}
{{ end }}
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
{{ $meta.Add "partials" (slice (partial "meta/reading-time.html" .)) }}
{{ end }}