From 8eb5239906bdb6419d71a7b02dbc1524d3a861e2 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Fri, 13 Feb 2026 09:04:19 +0100 Subject: [PATCH] fix: move post navigation from sidebar to main content area Post navigation (prev/next) now renders below the syndication block in the main content flow, matching how listing pages work. Removed from sidebar widget system. Co-Authored-By: Claude Opus 4.6 --- _includes/components/blog-sidebar.njk | 3 -- _includes/components/post-navigation.njk | 64 ++++++++++++++++++++++++ _includes/layouts/post.njk | 3 ++ 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 _includes/components/post-navigation.njk diff --git a/_includes/components/blog-sidebar.njk b/_includes/components/blog-sidebar.njk index 45ba0bd..ebfceb0 100644 --- a/_includes/components/blog-sidebar.njk +++ b/_includes/components/blog-sidebar.njk @@ -8,8 +8,6 @@ {% include "components/widgets/author-card-compact.njk" %} {% elif widget.type == "author-card" %} {% include "components/widgets/author-card.njk" %} - {% elif widget.type == "post-navigation" %} - {% include "components/widgets/post-navigation.njk" %} {% elif widget.type == "toc" %} {% include "components/widgets/toc.njk" %} {% elif widget.type == "post-categories" %} @@ -63,7 +61,6 @@ {% else %} {# === Fallback: default blog post sidebar (backward compatibility) === #} {% include "components/widgets/author-card-compact.njk" %} - {% include "components/widgets/post-navigation.njk" %} {% include "components/widgets/toc.njk" %} {% include "components/widgets/post-categories.njk" %} {% include "components/widgets/recent-posts-blog.njk" %} diff --git a/_includes/components/post-navigation.njk b/_includes/components/post-navigation.njk new file mode 100644 index 0000000..4cd93c4 --- /dev/null +++ b/_includes/components/post-navigation.njk @@ -0,0 +1,64 @@ +{# Post Navigation - Previous/Next (main content area, below post) #} +{% set _prevPost = collections.posts | previousInCollection(page) %} +{% set _nextPost = collections.posts | nextInCollection(page) %} + +{% if _prevPost or _nextPost %} + +{% endif %} diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index bab037b..e67d1d1 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -163,3 +163,6 @@ withBlogSidebar: true {# Webmentions display - likes, reposts, replies #} {% include "components/webmentions.njk" %} + +{# Post Navigation - Previous/Next #} +{% include "components/post-navigation.njk" %}