aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/count-drafts.html
blob: 95f04ed9114b36ca6d9b4b1d09a8d64d24b1b6e0 (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) -}}