From 8af3cc329de86ac36ce77cf74f0c30e24a5d4b5d Mon Sep 17 00:00:00 2001 From: Ricardo Date: Thu, 26 Mar 2026 16:25:36 +0100 Subject: [PATCH] fix: pagination scrambling and scroll + feat: excludePostTypes filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix duplicate x-for keys causing scrambled pagination numbers on interactions page (two '…' entries shared the same key) - Fix scroll target in goToPage — was using dead closest('[x-show]') selector, now scrolls to #webmentions-list - Add flex-wrap to pagination-links for mobile overflow - Add excludePostTypes Eleventy filter to exclude post types from collections by detecting type from frontmatter properties - Wire excludePostTypes into recent-posts section via sectionConfig - Add error/stale data banner to changelog page --- .../components/sections/recent-posts.njk | 6 ++++-- changelog.njk | 13 ++++++++++++- eleventy.config.js | 19 +++++++++++++++++++ interactions.njk | 9 ++++----- 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/_includes/components/sections/recent-posts.njk b/_includes/components/sections/recent-posts.njk index 5e9f2ed..92eb084 100644 --- a/_includes/components/sections/recent-posts.njk +++ b/_includes/components/sections/recent-posts.njk @@ -7,15 +7,17 @@ {% set sectionConfig = section.config or {} %} {% set maxItems = sectionConfig.maxItems or 5 %} {% set showSummary = sectionConfig.showSummary if sectionConfig.showSummary is defined else true %} +{% set excludeTypes = sectionConfig.excludeTypes or [] %} +{% set recentPosts = collections.posts | excludePostTypes(excludeTypes) | head(maxItems) %} -{% if collections.posts and collections.posts.length %} +{% if recentPosts and recentPosts.length %}

{{ sectionConfig.title or "Recent Posts" }}

- {% for post in collections.posts | head(maxItems) %} + {% for post in recentPosts %} {# Detect post type from frontmatter properties #} {% set likedUrl = post.data.likeOf or post.data.like_of %} {% set bookmarkedUrl = post.data.bookmarkOf or post.data.bookmark_of %} diff --git a/changelog.njk b/changelog.njk index 0b0f3f0..694cd41 100644 --- a/changelog.njk +++ b/changelog.njk @@ -59,6 +59,14 @@ withSidebar: false Loading changelog...
+ {# Error/stale data banner #} +
+

+ Note: + +

+
+ {# Commit list #}