I have the following taxonomies for the default language (en) and a second language (de):
#config.toml
taxonomies = [
{name = "categories"},
]
[languages.de]
taxonomies = [
{name = "kategorien"},
]
In my template the get_taxonomy_url
function works only for the default language:
#template.html
{%- if page.taxonomies.categories %}
{% for cat in page.taxonomies.categories %}
<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}">{{ cat }}</a>
{% endfor %}
{% endif %}
{%- if page.taxonomies.kategorien %}
{% for kat in page.taxonomies.kategorien %}
<a href="{{ get_taxonomy_url(kind='kategorien', name=kat) | safe }}">{{ kat }}</a>
{% endfor %}
{% endif %}
For the second language I get this error:
Error: Reason: Function call 'get_taxonomy_url' failed
Error: Reason: `get_taxonomy_url`: couldn't find `Gedichte` in `kategorien` taxonomy
“Gedichte” is a term
in a md file:
#post.md
+++
[taxonomies]
kategorien = ["Gedichte"]
+++
What am I doing wrong?