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:
parent
2d6b0f8173
commit
e933a44125
2 changed files with 45 additions and 5 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue