aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/count-likes.html
blob: e9a2d097bfb9882223c8d75b15cd86a12f3a8ac2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{- $author := partial "function-authors-data.html" . -}}
{{- $count := 0 -}}

{{- $likes := where .Site.RegularPages ".Params.liked" true -}}
{{- $authors := where .Site.RegularPages "Section" $author.user -}}
{{- $filteredPages := $authors | intersect $likes -}}

{{- range $filteredPages -}}
  {{- $count = add $count 1 -}}
{{- end -}}

{{- print (lang.FormatNumberCustom 0 $count) -}}