Using a dictionary library for i18n, also shows how to use i18n with navigation plugin.

This commit is contained in:
Zach Leatherman
2022-07-27 17:00:44 -05:00
parent a4dade2537
commit bd40861468
8 changed files with 52 additions and 12 deletions

View File

@ -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>