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

@ -1,10 +1,11 @@
---
layout: layouts/post.njk
layout: layouts/base.njk
title: About Me
templateClass: tmpl-post
eleventyNavigation:
key: About Me
key: nav.about
order: 3
---
# {{ title }}
I am a person that writes stuff.

View File

@ -1,7 +1,7 @@
---
layout: layouts/home.njk
eleventyNavigation:
key: Archive
key: nav.archive
order: 2
---

View File

@ -1,7 +1,7 @@
---
layout: layouts/home.njk
eleventyNavigation:
key: Home
key: i18n.nav.home
order: 1
---
{% set maxPosts = collections.posts.length | min(3) %}