aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/count-feeds.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/count-feeds.html')
-rw-r--r--themes/default/layouts/partials/count-feeds.html15
1 files changed, 5 insertions, 10 deletions
diff --git a/themes/default/layouts/partials/count-feeds.html b/themes/default/layouts/partials/count-feeds.html
index cf54180..68495da 100644
--- a/themes/default/layouts/partials/count-feeds.html
+++ b/themes/default/layouts/partials/count-feeds.html
@@ -1,12 +1,7 @@
-{{ $author := partial "author-user.html" . }}
-{{ $count := 0 }}
+{{- $author := .Section -}}
-{{ range .Site.Pages }}
- {{ if .Params.feed }}
- {{ if eq .Type $author }}
- {{ $count = add $count 1 }}
- {{ end }}
- {{ end }}
-{{ end }}
+{{- $feeds := where .Site.Pages "Params.feed" "ne" nil -}}
+{{- $authors := where .Site.Pages "Section" $author -}}
+{{- $filteredPages := $authors | intersect $feeds -}}
-{{ print (lang.FormatNumberCustom 0 $count) " " "Messages" }}
+{{- print (lang.FormatNumberCustom 0 (len $filteredPages)) -}}