aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2023-12-01 14:06:00 +0200
committerGitHub <noreply@github.com>2023-12-01 14:06:00 +0200
commita05b7b5cd81cb83d187666007b425e168059f803 (patch)
treea18fba8aac410ec33bb9ba288ce5dc8d8158bf87
parent9bea9303be43331c127b977cc77bcd920d83b0a2 (diff)
checks if post is explicitly set to not be pinned
contributed by MirMiz
-rw-r--r--layouts/partials/index/announcements.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/partials/index/announcements.html b/layouts/partials/index/announcements.html
index 2bb7f08..389d673 100644
--- a/layouts/partials/index/announcements.html
+++ b/layouts/partials/index/announcements.html
@@ -1,5 +1,7 @@
{{ $allPosts := where .Site.RegularPages "Params.section" "issue" }}
-{{ $active := where $allPosts "Params.resolved" "=" false }}
+{{ $allActive := where $allPosts "Params.resolved" "=" false }}
+{{ $active := where $allActive "Params.pin" "!=" false }}
+{{/* this $active checks if pin is explicitely set to false */}}
{{ $informationals := where $allPosts "Params.informational" "=" true }}
{{ $pinned := where $informationals "Params.pin" "=" true }}