From 3b7fd3db9c33fd3ca6114ca00fffa2a91f682a0a Mon Sep 17 00:00:00 2001 From: welpo Date: Thu, 14 Nov 2024 18:41:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20link=20to=20"All=20posts"?= =?UTF-8?q?=20in=20non-default-language=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was linking to e.g. `es/blog/_index.es.md` instead of `/es/blog/` --- templates/macros/list_posts.html | 2 +- templates/partials/main_page_posts_list.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/macros/list_posts.html b/templates/macros/list_posts.html index ade5a18..55a1ef7 100644 --- a/templates/macros/list_posts.html +++ b/templates/macros/list_posts.html @@ -3,7 +3,7 @@ {# It would also work with arrays (e.g. ["dates"] or ["indexes"] or even ["indexes","dates"]). #} {# Nevertheless, arrays cannot be used as a default value for a macro parameter in Tera (see https://github.com/Keats/tera/issues/710). #} {# `paginator` is only used to compute indexes metadata and can be let empty otherwise. #} -{% macro list_posts(posts, all_posts="", max=999999, metadata="dates", language_strings="", section_path="blog", paginator="", pinned_first=false, current_page=1) %} +{% macro list_posts(posts, all_posts="", max=999999, metadata="dates", language_strings="", section_path="", paginator="", pinned_first=false, current_page=1) %} {%- set separator = config.extra.separator | default(value="•") -%} diff --git a/templates/partials/main_page_posts_list.html b/templates/partials/main_page_posts_list.html index c532a3b..067e178 100644 --- a/templates/partials/main_page_posts_list.html +++ b/templates/partials/main_page_posts_list.html @@ -49,7 +49,7 @@ all_posts=all_posts, max=max_posts, language_strings=language_strings, - section_path=path, + section_path=extra_section.path | default(value="blog"), pinned_first=is_root_section, current_page=paginator.current_index | default(value=1) ) }}