small fixes

This commit is contained in:
teldra 2022-04-08 14:44:17 +02:00
parent f5944d423c
commit ec971bbab4
1 changed files with 2 additions and 3 deletions

View File

@ -5,9 +5,8 @@
{{ end }}
{{ define "main" }}
{{ $s := .Site.Params }}
{{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" $s.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 -14) }}
{{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }}
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 -14) }}
{{ $featured = $all | intersect $featured }}
{{ $posts := $all | complement $featured }}
{{- $paginator := .Paginate $posts -}}