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 | 088ff760327f0e7f3d1e4d734442cb1a6b151f64 (patch) | |
tree | 80ef8eb9b7b9e0574e4a3b5290f5055214f1343f /themes/default/layouts/partials/count-marks.html | |
parent | fad87c5cc042ea293b3d5cd7a139d124dce1cbd4 (diff) | |
download | canory-088ff760327f0e7f3d1e4d734442cb1a6b151f64.tar.gz canory-088ff760327f0e7f3d1e4d734442cb1a6b151f64.tar.bz2 canory-088ff760327f0e7f3d1e4d734442cb1a6b151f64.zip |
config: Likes -> Marked
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) -}} |