Hi lovely Hugo community
I’m quite new in the hugo world (moved from Jekyll) and as I face a first problem/question, I thought I will give this form a try.
I’m working on a static website with four languages (English, French, German and Italian). I decided to go with the multi language support with only one folder but multiple .md
-files (one per language). So my structure look like this:
content/
index.en.md
index.de.md
index.fr.md
index.it.md
section1/
index.en.md
index.de.md
index.fr.md
index.it.md
section2/
_index.en.md
_index.de.md
_index.fr.md
_index.it.md
subsection21/
index.en.md
index.de.md
index.fr.md
index.it.md
My goal is to get a menu with the entries: section1 and section2. I first tried to use the sectionPagesMenu = "main"
option but this didn’t work out. My guess is that because section1 is a single page, it’s not a proper section and that’s why it is not working. In my second attempt, I added the menu
param in the front matter in every .md
-file but this didn’t work either. My next step would be to add the menu per language in the config.yaml
but I would prefer it the menu would be generated automatically from the folder/file structure (my first attempt) or by the definition in the front matter (my second attempt). Having to add a menu entry in the config file for every new section seems prone to errors/forgetting as I experienced it in a Jekyll project.