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.html17
1 files changed, 5 insertions, 12 deletions
diff --git a/themes/default/layouts/partials/count-feeds.html b/themes/default/layouts/partials/count-feeds.html
index 0b8cacc..68495da 100644
--- a/themes/default/layouts/partials/count-feeds.html
+++ b/themes/default/layouts/partials/count-feeds.html
@@ -1,14 +1,7 @@
-{{- $author := partial "function-authors-data.html" . -}}
-{{- $author = $author.user -}}
+{{- $author := .Section -}}
-{{ $count := 0 }}
+{{- $feeds := where .Site.Pages "Params.feed" "ne" nil -}}
+{{- $authors := where .Site.Pages "Section" $author -}}
+{{- $filteredPages := $authors | intersect $feeds -}}
-{{ range .Site.Pages }}
- {{ if .Params.feed }}
- {{ if eq .Type $author }}
- {{ $count = add $count 1 }}
- {{ end }}
- {{ end }}
-{{ end }}
-
-{{ print (lang.FormatNumberCustom 0 $count) " " "Messages" }}
+{{- print (lang.FormatNumberCustom 0 (len $filteredPages)) -}}