diff options
Diffstat (limited to 'themes/default/layouts/partials/count-marks.html')
-rw-r--r-- | themes/default/layouts/partials/count-marks.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/count-marks.html b/themes/default/layouts/partials/count-marks.html new file mode 100644 index 0000000..b251555 --- /dev/null +++ b/themes/default/layouts/partials/count-marks.html @@ -0,0 +1,11 @@ +{{- $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) -}} |