diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html
index 8a6d1ba3..13d72cb1 100644
--- a/themes/buha/layouts/index.html
+++ b/themes/buha/layouts/index.html
@@ -6,9 +6,10 @@
{{ define "main" }}
{{ $s := .Site.Params }}
- {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
- {{- $featured := where (where $posts ".Params.featured" "=" true) "Type" "in" $s.searchSections }}
- {{ $featured = where $featured ".Params.Lastmod" "gt" (now.AddDate 0 0 -14) }}
+ {{- $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) }}
+ {{ $featured = $all | intersect $featured }}
+ {{ $posts := $all | complement $featured }}
{{- $paginator := .Paginate $posts -}}
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}
@@ -18,12 +19,12 @@
{{ end }}
{{ if gt (len $featured) 0 }}
{{if "featured" | i18n }}{{ "featured" | i18n }}{{ else }}{{ "Featured" }}{{ end }}
- {{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "14" "featured" "true") }}
+ {{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" ) }}
{{ end }}
{{ end }}
{{ if gt (len $posts) 1 }}
{{ if "news" | i18n }}{{ "news" | i18n }}{{ else }}{{ "News" }}{{ end }}
- {{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5" "max_age" "-14") }}
+ {{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5") }}