aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/home.wordstats.json
diff options
context:
space:
mode:
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 -}}
+]