Using a dictionary library for i18n, also shows how to use i18n with navigation plugin.
This commit is contained in:
1 parent
a4dade2537
commit
bd40861468
8 files changed
+52
-12
No files matched your search
@@ -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