Skip to content

Commit

Permalink
🐛 fix: link to "All posts" in non-default-language root
Browse files Browse the repository at this point in the history
Was linking to e.g. `es/blog/_index.es.md` instead of `/es/blog/`
  • Loading branch information
welpo committed Nov 14, 2024
1 parent 1cf2732 commit 3b7fd3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/macros/list_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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="•") -%}

Expand Down
2 changes: 1 addition & 1 deletion templates/partials/main_page_posts_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)
) }}
Expand Down

0 comments on commit 3b7fd3d

Please sign in to comment.