summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authoryingyu5658 <i@yingyu5658.me>2026-01-24 21:34:27 +0800
committeryingyu5658 <i@yingyu5658.me>2026-01-24 21:34:27 +0800
commitc8d455cc3d4336702b4b9854ba686b584bf3f770 (patch)
treedd6911f03efe074c11335b994ed0080e7a31d41a /layouts
parentc08add089657efbed69165acdfa55a635df3c0aa (diff)
downloadblog-c8d455cc3d4336702b4b9854ba686b584bf3f770.tar.gz
blog-c8d455cc3d4336702b4b9854ba686b584bf3f770.zip
chore: recover the word count of category "往昔"
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/word-count.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/shortcodes/word-count.html b/layouts/shortcodes/word-count.html
index 142c42e..38dbe0e 100644
--- a/layouts/shortcodes/word-count.html
+++ b/layouts/shortcodes/word-count.html
@@ -1,9 +1,9 @@
{{ $scratch := newScratch }} {{ if eq (.Get 0) "posts" }} {{ range where
site.RegularPages "Type" "in" (slice "posts" "jottings" "readings" "tech") }} {{
-if not (in .Params.categories "往昔") }} {{ $scratch.Add "wordcount" .WordCount
+if not (in .Params.categories "!往昔!") }} {{ $scratch.Add "wordcount" .WordCount
}} {{ end }} {{ end }} {{ else if eq (.Get 0) "all" }} {{ range where
site.RegularPages "Type" "in" (slice "posts" "about" "newsgroup" "links"
-"jottings" "readings" "tech") }} {{ if not (in .Params.categories "往昔") }} {{
+"jottings" "readings" "tech") }} {{ if not (in .Params.categories "!往昔") }} {{
$scratch.Add "wordcount" .WordCount }} {{ end }} {{ end }} {{ end }} {{ $count
:= $scratch.Get "wordcount" }} {{ if gt $count 0 }} {{ $count }} 字, {{/*
名著数据库(字数单位:汉字) */}} {{ $classics := slice (dict "name" "红楼梦"