aboutsummaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authorJieiku2023-05-22 22:39:16 -0700
committerJieiku2023-05-22 22:39:16 -0700
commit2d0788c3981328f1fbd9de4274d2925bf9586e03 (patch)
treecee4b3c0a624ce79fcc14b2c57789a95578e4ea5 /templates/index.html
parent6dcec618d0ff0a2270f787f62267a0622275c69d (diff)
downloadabridge-2d0788c3981328f1fbd9de4274d2925bf9586e03.tar.gz
abridge-2d0788c3981328f1fbd9de4274d2925bf9586e03.tar.bz2
abridge-2d0788c3981328f1fbd9de4274d2925bf9586e03.zip
Add multi-lingual Support
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index 4702e16..84314b1 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -54,11 +54,15 @@
{%- endfor %}
{{- macros::pagination(paginator=paginator, config=config) }}
</div>
+ {%- if lang == config.default_language %}
{%- set section_item = get_section(path="_index.md") %}
+ {%- else %}
+ {%- set section_item = get_section(path="_index." ~ lang ~ ".md") %}
+ {%- endif %}
{%- if config.extra.recent | default(value=true) %}
<div class="toc">
<div class="toc-sticky">
- <h1><span class="s75">Recent Posts</span></h1>
+ <h1><span class="s70">{%- if lang != config.default_language %}{{ trans(key="Recent_Posts" | safe, lang=lang) }}{% else %}Recent Posts{% endif %}</span></h1>
{%- set recent_items=config.extra.recent_items | default(value=9) -%}
{%- for page in section_item.pages | slice(end=recent_items) %}
{{- page_macros::page_listing(page=page, config=config) }}