diff --git a/_includes/components/sections/recent-posts.njk b/_includes/components/sections/recent-posts.njk index b4e9a3b..7295857 100644 --- a/_includes/components/sections/recent-posts.njk +++ b/_includes/components/sections/recent-posts.njk @@ -9,10 +9,15 @@ {% set showSummary = sectionConfig.showSummary if sectionConfig.showSummary is defined else true %} {% set primaryPosts = collections.posts if (collections and collections.posts) else [] %} {% set fallbackRecentPosts = collections.recentPosts if (collections and collections.recentPosts) else [] %} +{% set debugPrimaryCount = primaryPosts.length %} +{% set debugFallbackCount = fallbackRecentPosts.length %} {% set listedPosts = primaryPosts | excludeUnlistedPosts | excludeWhereNotes %} +{% set debugListedCount = listedPosts.length %} {% if not (listedPosts and listedPosts.length) %} {% set listedPosts = fallbackRecentPosts | excludeUnlistedPosts | excludeWhereNotes %} + {% set debugListedCount = listedPosts.length %} {% endif %} +