From 2d0788c3981328f1fbd9de4274d2925bf9586e03 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 22 May 2023 22:39:16 -0700 Subject: Add multi-lingual Support --- templates/posts.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'templates/posts.html') diff --git a/templates/posts.html b/templates/posts.html index d4fc9e4..a353d15 100644 --- a/templates/posts.html +++ b/templates/posts.html @@ -18,7 +18,11 @@ {%- endblock seo %} {%- block content %} -{%- set section_item = get_section(path="_index.md") %} + {%- if lang == config.default_language %} + {%- set section_item = get_section(path="_index.md") %} + {%- else %} + {%- set section_item = get_section(path="_index." ~ lang ~ ".md") %} + {%- endif %}
{%- for year, posts in section_item.pages | group_by(attribute="year") %}

{{ year }}

-- cgit v1.3.1