aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/home.wordstats.json
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-02-09 22:35:53 +0100
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-02-10 05:07:11 +0100
commit563b48869cee85f345537cce09da0f991da46a9b (patch)
tree7d74a12495c95db577421e5e8c245b1a2186d62e /layouts/_default/home.wordstats.json
parent2ba2d3ad1547f7b3e30b94cc070f64f2940a66ca (diff)
Word count analysis
Diffstat (limited to 'layouts/_default/home.wordstats.json')
-rw-r--r--layouts/_default/home.wordstats.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/_default/home.wordstats.json b/layouts/_default/home.wordstats.json
new file mode 100644
index 0000000..b227510
--- /dev/null
+++ b/layouts/_default/home.wordstats.json
@@ -0,0 +1,11 @@
+[
+{{- $pages := where site.RegularPages "Section" "posts" -}}
+{{- $first := true -}}
+{{- range $pages -}}
+{{- if not .Draft -}}
+{{- if not $first }},{{ end -}}
+{"title":{{ .Title | jsonify }},"wordCount":{{ .WordCount }}}
+{{- $first = false -}}
+{{- end -}}
+{{- end -}}
+]