From b9c195cd39a477c5961eeefb5c428b01562921e0 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 9 Aug 2022 18:01:02 -0400 Subject: themes/default/layouts/partials/following-list: Ensure uniqueness Unique intersect on the domain only. --- .../default/layouts/partials/following-list.html | 37 ++++++++++++++++------ 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'themes/default') diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html index da8615d..7ef4f34 100644 --- a/themes/default/layouts/partials/following-list.html +++ b/themes/default/layouts/partials/following-list.html @@ -1,11 +1,18 @@ {{- $following := slice -}} +{{- $unique := slice -}} + {{- range (where .Site.Pages "Params.Author" (partial "author-user.html" .)) -}} {{- if .Params.feed -}} {{- $following = $following | append (dict - "Name" .Params.feed.name - "Domain" .Params.feed.domain - "Favicon" .Params.feed.image + "Domain" .Params.feed.domain + ) + -}} + {{- + $unique = $unique | append (dict + "Name" .Params.feed.name + "Domain" .Params.feed.domain + "Favicon" .Params.feed.image ) -}} {{- end -}} @@ -14,29 +21,39 @@

Following