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

{{- $authors := where .Site.RegularPages "Section" $author.user -}}
{{- $drafts := where .Site.RegularPages "Draft" true -}}
{{- $filteredPages := $authors | intersect $drafts -}}

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

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