Add basic support for multilingual site

Add language switcher on the top right of the site
Switches taxonomies, article paths, home, etc.
Every language is independent
This commit is contained in:
Teo-CD 2020-10-02 21:05:35 +02:00
parent 2d6b0f8173
commit e933a44125
2 changed files with 45 additions and 5 deletions

View file

@ -93,7 +93,7 @@
{% if page.taxonomies.authors %}
by
{% for author in page.taxonomies.authors %}
<a href="{{ get_taxonomy_url(kind="authors", name=author) | safe }}">
<a href="{{ get_taxonomy_url(kind="authors", name=author, lang=page.lang) | safe }}">
<span class="tag is-primary">{{ author }} </span>
</a>
{% if page.taxonomies.authors | length > 1 %}
@ -113,7 +113,7 @@ and
{% macro post_footer_categories(page) %}
{% if page.taxonomies.categories %}
{% set category = page.taxonomies.categories[0] %}
in <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">
in <a href="{{ get_taxonomy_url(kind="categories", name=category, lang=page.lang) | safe }}">
<span class="tag is-success">
{{ category }}
</span>
@ -126,7 +126,7 @@ in <a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">
{% if page.taxonomies.tags %}
and tagged
{% for tag in page.taxonomies.tags %}
<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">
<a href="{{ get_taxonomy_url(kind="tags", name=tag, lang=page.lang) | safe }}">
<span class="tag is-link">{{ tag }} </span>
</a>
{% if page.taxonomies.tags | length > 1 %}