diff options
Diffstat (limited to 'themes/default/layouts/partials/count-drafts.html')
-rw-r--r-- | themes/default/layouts/partials/count-drafts.html | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/themes/default/layouts/partials/count-drafts.html b/themes/default/layouts/partials/count-drafts.html index 95f04ed..fae0b90 100644 --- a/themes/default/layouts/partials/count-drafts.html +++ b/themes/default/layouts/partials/count-drafts.html @@ -1,12 +1,7 @@ -{{- $author := partial "function-authors-data.html" . -}} -{{- $count := 0 -}} +{{- $author := .Section -}} -{{- $authors := where .Site.RegularPages "Section" $author.user -}} +{{- $authors := where .Site.RegularPages "Section" $author -}} {{- $drafts := where .Site.RegularPages "Draft" true -}} {{- $filteredPages := $authors | intersect $drafts -}} -{{- range $filteredPages -}} - {{- $count = add $count 1 -}} -{{- end -}} - -{{- print (lang.FormatNumberCustom 0 $count) -}} +{{- print (lang.FormatNumberCustom 0 (len $filteredPages)) -}} |