Using a dictionary library for i18n, also shows how to use i18n with navigation plugin.
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
{#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #}
|
||||
<ul class="nav">
|
||||
{%- for entry in collections.all | eleventyNavigation %}
|
||||
<li class="nav-item{% if entry.url == page.url %} nav-item-active{% endif %}"><a href="{{ entry.url | url }}">{{ entry.title }}</a></li>
|
||||
<li class="nav-item{% if entry.url == page.url %} nav-item-active{% endif %}"><a href="{{ entry.url | url }}">{{ entry.title | i18n }}</a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
</header>
|
||||
|
Reference in New Issue
Block a user