From 79bc55e2bbc72af5791aeb866df2460011d52ae3 Mon Sep 17 00:00:00 2001 From: Peter Date: Sun, 14 Jul 2024 10:02:31 +0200 Subject: [PATCH] Further changes to make pagination actually work --- content/posts/_index.md | 1 + templates/partials/home_posts.html | 5 ++--- templates/partials/post_nav_links.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/posts/_index.md b/content/posts/_index.md index 47aff93..790a475 100644 --- a/content/posts/_index.md +++ b/content/posts/_index.md @@ -4,4 +4,5 @@ sort_by = "date" paginate_by = 5 insert_anchor_links = "right" generate_feed = true +transparent = true +++ diff --git a/templates/partials/home_posts.html b/templates/partials/home_posts.html index dad075e..8e81a80 100644 --- a/templates/partials/home_posts.html +++ b/templates/partials/home_posts.html @@ -1,5 +1,4 @@ -{% set posts = get_section(path="posts/_index.md") %} -{% for page in posts.pages | slice(end=10) %} +{% for page in paginator.pages %}

{{ page.title }}

@@ -16,7 +15,7 @@

{{ page.title }}

{% endfor %} -{% if posts.pages | length > 5 %} +{% if paginator %}