11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.
https://demo-base-blog.11ty.dev/
MIT License
1.23k stars 619 forks source link

I18n of pages in navigation header #136

Open jonatanlinden opened 1 year ago

jonatanlinden commented 1 year ago

Hi, great work!

I'm interested in how to use eleventy with bilingual websites, so I started playing around with the v2 example. In a naive way, I symlinked en/about to es/about, hoping that would work as expected, that is, the link About in the top navigation would link to the correct language page, based on the url. Instead the link is duplicated, e.g., in the English language page there are two links 'About'. I guess the reason is because of how the navigation header is generated, based on the following piece of yaml front matter

eleventyNavigation:
  key: nav.about
  order: 3

Have I missed something basic? Or is this just a consequence of how the navigation happened to be implemented in this example?