diff options
author | tdro <tdro@noreply.example.com> | 2023-12-30 16:39:52 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-12-30 16:39:52 -0500 |
commit | 539775f2cb048827b1a93896f0d848c1bbd6edc1 (patch) | |
tree | 88750e2ca96b44f88e6fb5f936d35c0d217b6ce7 /themes/default/layouts/partials/count-feeds.html | |
parent | 4bd7e2fa02f13b4db505c4b13cf824cc1174201b (diff) | |
download | canory-539775f2cb048827b1a93896f0d848c1bbd6edc1.tar.gz canory-539775f2cb048827b1a93896f0d848c1bbd6edc1.tar.bz2 canory-539775f2cb048827b1a93896f0d848c1bbd6edc1.zip |
themes/default/layouts/partials/count: Avoid range in counters
Diffstat (limited to 'themes/default/layouts/partials/count-feeds.html')
-rw-r--r-- | themes/default/layouts/partials/count-feeds.html | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/themes/default/layouts/partials/count-feeds.html b/themes/default/layouts/partials/count-feeds.html index b3053e2..68495da 100644 --- a/themes/default/layouts/partials/count-feeds.html +++ b/themes/default/layouts/partials/count-feeds.html @@ -1,12 +1,7 @@ -{{- $author := partial "function-authors-data.html" . -}} -{{- $count := 0 -}} +{{- $author := .Section -}} {{- $feeds := where .Site.Pages "Params.feed" "ne" nil -}} -{{- $authors := where .Site.Pages "Section" $author.user -}} +{{- $authors := where .Site.Pages "Section" $author -}} {{- $filteredPages := $authors | intersect $feeds -}} -{{- range $filteredPages -}} - {{- $count = add $count 1 -}} -{{- end -}} - -{{- print (lang.FormatNumberCustom 0 $count) -}} +{{- print (lang.FormatNumberCustom 0 (len $filteredPages)) -}} |