Closed Dexus closed 5 months ago
Any issues with running Eleventy twice, sequentially? One for each language?
@zachleat - How would you avoid duplicating pages for each langauge-folder ? I would love to Not duplicate website pages in each language folder ( pages like about us , homepage ) -> or automatically copy these parent templates just replacing the language variable in them and keeping translations in the jsons.
++-----_data ++-----_includes ++-----pages <- input folder ++-------homepage.njk ++-------about-us.njk ++-------our-vision.njk ++-----de +++-------de.json(https://de.example.com/) +++-------index.njk (permalink: /index.html) ++-----en-us +++-------en-us.json(https://en-us.example.com/) +++-------index.njk (permalink: /index.html)
11ty now includes i18n documentation and an i18n plugin:
https://www.11ty.dev/docs/i18n/ https://www.11ty.dev/docs/plugins/i18n/
Thanks y’all!
Is your feature request related to a problem? Please describe. If I create a website that is multilingual, I would like to be able to specify a domain for the permalink or for the collection
item.url
for each language with basedomain.currently the permalink is unique and so it is not possible to use the subdomain style for multilinguale websites or multi-websites that all based on the same project.
Describe the solution you'd like
permalink: "https://{{ locale }}.{{baseUrl}}/blog/{{ page.fileSlug }}/index.html"
orpermalink: "https://{{baseUrl}}/blog/{{ page.fileSlug }}/index.html"
without error about already existing permalinks - if the baseurl is different.Describe alternatives you've considered The possibility to create a JSON in the content directory, which marks this directory as a separate domain, so that it contains a separate directory with all assets when generating. As well as the possibility to link directly to this website or to retrieve data via Collections.
Additional context