aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/count-feeds.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-26 19:06:10 -0400
committertdro <tdro@noreply.example.com>2022-05-26 19:06:10 -0400
commit7f8f4c2dbe5fbf157fd21558a6856fd11c8ea43c (patch)
tree89c0c404e5ee23369054e4230820c16bebdfd576 /themes/default/layouts/partials/count-feeds.html
parentc424664740830fda3aa7cccaf2b44d6e4c2405f6 (diff)
downloadcanory-7f8f4c2dbe5fbf157fd21558a6856fd11c8ea43c.tar.gz
canory-7f8f4c2dbe5fbf157fd21558a6856fd11c8ea43c.tar.bz2
canory-7f8f4c2dbe5fbf157fd21558a6856fd11c8ea43c.zip
themes/default/layouts/_default/feeds: Count feeds
Diffstat (limited to 'themes/default/layouts/partials/count-feeds.html')
-rw-r--r--themes/default/layouts/partials/count-feeds.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/count-feeds.html b/themes/default/layouts/partials/count-feeds.html
new file mode 100644
index 0000000..cf54180
--- /dev/null
+++ b/themes/default/layouts/partials/count-feeds.html
@@ -0,0 +1,12 @@
+{{ $author := partial "author-user.html" . }}
+{{ $count := 0 }}
+
+{{ range .Site.Pages }}
+ {{ if .Params.feed }}
+ {{ if eq .Type $author }}
+ {{ $count = add $count 1 }}
+ {{ end }}
+ {{ end }}
+{{ end }}
+
+{{ print (lang.FormatNumberCustom 0 $count) " " "Messages" }}