fix: remove hidden posts using where keyword (#1212)

This commit is contained in:
Jimmy
2025-12-22 17:12:34 +01:00
committed by GitHub
parent 475d01b046
commit dc36aa60a9
5 changed files with 5 additions and 10 deletions
+1 -2
View File
@@ -6,8 +6,7 @@
<!-- Build paginator -->
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }}
{{ $filtered := where $pages "Params.hidden" "!=" true }}
{{ $pag := .Paginate ($filtered) }}
{{ if .Paginator.HasPrev }}