From 6b8f7c09adf6bfc19741c10f8b7bb1982c24419b Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sun, 10 Oct 2021 16:48:20 +0300 Subject: fix bug so same post doesn't show up twice --- layouts/partials/index/announcements.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'layouts/partials') diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html index 5f425fc..e33c262 100644 --- a/layouts/partials/index/announcements.html +++ b/layouts/partials/index/announcements.html @@ -1,10 +1,11 @@ {{ $incidents := where .Site.RegularPages "Params.section" "issue" }} {{ $active := where $incidents "Params.resolved" "=" false }} +{{ $activeIncidents := where $incidents "Params.informational" "=" false }} {{ $pinned := where $incidents "Params.pin" "=" true }} -{{ if or ($active) ($pinned) }} +{{ if or ($activeIncidents) ($pinned) }}
- {{ range $active }} + {{ range $activeIncidents }}

{{ .Title }} → @@ -39,7 +40,7 @@ {{ end }}

- {{ .Content | safeHTML | truncate 500 "…" }} + {{ .Content | safeHTML | truncate 500 "…" }}


-- cgit v1.2.3-70-g09d2