aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/count-marks.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
committertdro <tdro@noreply.example.com>2023-12-30 16:39:52 -0500
commit539775f2cb048827b1a93896f0d848c1bbd6edc1 (patch)
tree88750e2ca96b44f88e6fb5f936d35c0d217b6ce7 /themes/default/layouts/partials/count-marks.html
parent4bd7e2fa02f13b4db505c4b13cf824cc1174201b (diff)
downloadcanory-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-marks.html')
-rw-r--r--themes/default/layouts/partials/count-marks.html7
1 files changed, 1 insertions, 6 deletions
diff --git a/themes/default/layouts/partials/count-marks.html b/themes/default/layouts/partials/count-marks.html
index b251555..deb532d 100644
--- a/themes/default/layouts/partials/count-marks.html
+++ b/themes/default/layouts/partials/count-marks.html
@@ -1,11 +1,6 @@
-{{- $count := 0 -}}
{{- $author := .Section -}}
{{- $items := where .Site.RegularPages ".Params.marked" true -}}
{{- $authors := where .Site.RegularPages "Section" $author -}}
{{- $filteredPages := $authors | intersect $items -}}
-{{- range $filteredPages -}}
- {{- $count = add $count 1 -}}
-{{- end -}}
-
-{{- print (lang.FormatNumberCustom 0 $count) -}}
+{{- print (lang.FormatNumberCustom 0 (len $filteredPages)) -}}