feat: add multi-language support

This commit is contained in:
welpo
2023-05-22 19:12:03 +02:00
parent e316dc25ab
commit fa9229377d
49 changed files with 1314 additions and 88 deletions

View File

@@ -25,7 +25,7 @@
{% if post.taxonomies.tags %}
<div class="bloglist-tags">
{% for tag in post.taxonomies.tags %}
<a class="tag" href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>
<a class="tag" href="{{ get_taxonomy_url(kind='tags', name=tag, lang=lang) | safe }}">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
@@ -38,14 +38,14 @@
{% endif %}
</div>
<a class="readmore" href={{ post.permalink }}>Read more </a>
<a class="readmore" href={{ post.permalink }}>{%- if lang != config.default_language %} {{ trans(key="read_more" | safe, lang=lang) }} {% else %} Read more {% endif %}</a>
</div>
</section>
{% endif %}
{% if not loop.last %}
{% if loop.index == max %}
<div class="all-posts">
<a href="{{ get_url(path="/blog/") }}">All posts </a>
<a href="{{ get_url(path="blog", lang=lang) }}/">{%- if lang != config.default_language %} {{ trans(key="all_posts" | safe, lang=lang) }} {% else %} All posts {% endif %}</a>
</div>
{% endif %}
{% endif %}