Closed igorfree closed 2 months ago
Hi @igorfree 👋
Thanks for the feedback! Unfortunately I cannot debug your sites build issues with polyglot just by looking at the few template files. If you can share the code repo with me so I can clone it down and attempt to build and reproduce the issue, I can help ya that way. Otherwise here are some suggestions:
If you are using polyglot, chances are you might be using some other ruby gems. A few jekyll gems have been found to generate additional pages poorly when interacting with polyglot. Try identifying anything that might also be generating extra pages or content on jekyll page, if that can be interfering with correct site generation.
Clear out your existing _site directory and rebuild. Stale files in a build directory not cleaned up after newer builds are a source of misleading bugs. That's probably not what's happening here but I've seen duplicated site output happen that way.
For easier debugging, try setting parallel_localization: false
in the config and reducing the number of built languages. set pages published: false
in the frontmatter to prevent certain language pages from being included. Do this to narrow the issue down.
I hope this helps. Cheers and Good luck!
thank you for the detailed answer @untra! It turned out, a simple rm _site/* -R
was enough, no duplicates anymore. I thought jekyll would remove everything anyway each time it builds, but this has it's limits apparently.
I have following data structure before build (to separate my multilanguage pages):
My default_language for the site is "de". After the build, inside _site directory, the data structure should look like this (pages in default language are created without subdirectory, pages for non-default languages are inside their own subdirectories):
_site/index.html and _site/links.html are in German, _site/en/index.html and _site/en/links.html are in English.
However, in addition to the desired behaivour, additional subdirectories are created, like this:
_site/index.html and _site/links.html are in German, _site/en/index.html and _site/en/links.html are in English. _site/en/en/links.html is a duplicate and again in English. There are more pages than index and links, but the duplicating happens for all of them (except index).
Why are those duplicates created and how to get rid of them?
Front-matter for index.md (german):
Front-matter for links.md (german):
Front-matter for index.md (english):
Front-matter for links.md (english):