diff options
Diffstat (limited to 'themes/default/layouts/partials/count-drafts.html')
-rw-r--r-- | themes/default/layouts/partials/count-drafts.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/count-drafts.html b/themes/default/layouts/partials/count-drafts.html new file mode 100644 index 0000000..78b57a5 --- /dev/null +++ b/themes/default/layouts/partials/count-drafts.html @@ -0,0 +1,10 @@ +{{ $author := partial "author-user.html" . }} +{{ $count := 0 }} + +{{ range .Site.Pages }} + {{ if and (eq .Type $author) .Draft }} + {{ $count = add $count 1 }} + {{ end }} +{{ end }} + +{{ print (lang.FormatNumberCustom 0 $count) " " "Drafts" }} |