From b8c76e8f2213c8feb52e206182aad63f483b3fc9 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Tue, 24 Feb 2026 16:23:42 +0100 Subject: [PATCH] fix: recent-posts widget fallback to collections.recentPosts The widget used bare 'recentPosts' variable which doesn't exist in the homepage context (it's a collection). Add fallback to collections.recentPosts so the widget works on all pages. --- _includes/components/widgets/recent-posts.njk | 1 + 1 file changed, 1 insertion(+) diff --git a/_includes/components/widgets/recent-posts.njk b/_includes/components/widgets/recent-posts.njk index bdde1ba..13b8a78 100644 --- a/_includes/components/widgets/recent-posts.njk +++ b/_includes/components/widgets/recent-posts.njk @@ -1,4 +1,5 @@ {# Recent Posts Widget (sidebar) - compact type-aware list #} +{% set recentPosts = recentPosts or collections.recentPosts %} {% if recentPosts and recentPosts.length %}