From c8cf35e9b5b289198370a8312f55e1344c097887 Mon Sep 17 00:00:00 2001 From: BernatBC Date: Fri, 11 Aug 2023 12:20:07 +0200 Subject: [PATCH] Iterate posts from config file --- layouts/partials/sections/featured-posts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/sections/featured-posts.html b/layouts/partials/sections/featured-posts.html index 1bfe10b..25dccf2 100644 --- a/layouts/partials/sections/featured-posts.html +++ b/layouts/partials/sections/featured-posts.html @@ -20,8 +20,8 @@ {{ end }}
- {{ range (where (where site.RegularPages.ByDate.Reverse "Type" "posts" ) "Layout" "!=" "search") }} - {{if in $posts (.Title)}} + {{ range $post := .posts}} + {{ with site.GetPage $post }} {{ partial "cards/recent-post.html" . }} {{ end }} {{ end }}