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" %}