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.
This commit is contained in:
Ricardo
2026-02-24 16:23:42 +01:00
parent 910889cde8
commit b8c76e8f22
@@ -1,4 +1,5 @@
{# Recent Posts Widget (sidebar) - compact type-aware list #}
{% set recentPosts = recentPosts or collections.recentPosts %}
{% if recentPosts and recentPosts.length %}
<is-land on:visible>
<div class="widget">