Hello,
in my content/ folder i have files in my various subfolders/categories that look like this:
– accessories
— cat_1
---- article_1
----- index.en.md
----- index.en.md
---- article_2
----- index.en.md
----- index.en.md
— cat_2
---- article_1
----- index.en.md
----- index.en.md
and my folder structure (public/) should later look like this:
– zubehoer
— kategorie_1
---- artikel_1
----- index.html
---- artikel_2
----- index.html
— kategorie_2
---- artikel_1
----- index.html
– en
— category_1
---- article_1
----- index.html
etc…
By the way @Daniel_Lassak: I just realised that you might run into troubles this way in regards to “connecting” your content languages. With your old way, the filename-path-thingy makes it clear to Hugo, that your English about file (about.en.md) is connected to the German one (about.de.md). To have it working in this new by-language-directory-version you need to look after some things:
name content/de/about.md and content/en/about.md identical, don’t change the filename by language. same location and same name for every connected item
add a slug parameter to your frontmatter if you wish to have a different URL (slug: ueber-uns in the german version for the content/de/about.md file)
There is a way to add a frontmatter parameter that links these files, but I couldn’t find the name of the parameter this fast. You probably want to give the following link a thorough read (again):
I never had a setup where I would put the default language into a subdirectory. If you are hosting on Netlify or another service that offers redirection and headers this could be solved by some language headers: