fix: exclude unlisted (Loc) checkin posts from prev/next navigation
Build & Deploy / build-and-deploy (push) Successful in 1m28s

Switch both post-navigation components from collections.posts to
collections.listedPosts so unlisted Swarmapp check-ins no longer
appear in the previous/next post carousel.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-04-07 09:52:18 +02:00
parent 29db3d7476
commit 454666be49
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{# Post Navigation - Previous/Next (image-first, inspired by zachleat.com) #} {# Post Navigation - Previous/Next (image-first, inspired by zachleat.com) #}
{% set _prevPost = collections.posts | previousInCollection(page) %} {% set _prevPost = collections.listedPosts | previousInCollection(page) %}
{% set _nextPost = collections.posts | nextInCollection(page) %} {% set _nextPost = collections.listedPosts | nextInCollection(page) %}
{% if _prevPost or _nextPost %} {% if _prevPost or _nextPost %}
<nav class="post-navigation mt-8 pt-6 border-t border-surface-200 dark:border-surface-700" aria-label="Post navigation"> <nav class="post-navigation mt-8 pt-6 border-t border-surface-200 dark:border-surface-700" aria-label="Post navigation">
@@ -1,7 +1,7 @@
{# Post Navigation Widget - Previous/Next #} {# Post Navigation Widget - Previous/Next #}
{# Uses previousInCollection/nextInCollection filters to find adjacent posts #} {# Uses previousInCollection/nextInCollection filters to find adjacent posts #}
{% set _prevPost = collections.posts | previousInCollection(page) %} {% set _prevPost = collections.listedPosts | previousInCollection(page) %}
{% set _nextPost = collections.posts | nextInCollection(page) %} {% set _nextPost = collections.listedPosts | nextInCollection(page) %}
{% if _prevPost or _nextPost %} {% if _prevPost or _nextPost %}
<is-land on:visible> <is-land on:visible>