Hi,
So I had read this Cannot get hugo to cast menu maps but do not understand everything.
What I understood is that putting alla config files together into one config.toml will work… ans it does.
But, I want to split it into several ones into the configDir/_default
Thanks for your reply.
I think I did it right…
Structure :
/config.toml
config/_default/languages
config/_default/menus.fr.toml
config/_default/params.toml
And into the files :
config.toml :
configDir = 'config/'
languageCode = "fr-FR"
defaultContentLanguage = 'fr'
defaultContentLanguageInSubdir = false (That one might be set to true I think.... ? I have organise the /content with content/fr and content/en)
========================
menus.fr.toml avoid [[languages]] then
[[languages.fr.menu.main]]
name = 'Services'
url = 'fr/pages/services/'
weight = 1
[[languages.fr.menu.main]]
name = 'Projets'
url = '/fr/projets'
weight = 2
You’ll notice that there isn’t a menu key in config/_default/menu.yaml.
Do you mena I shall remove, not only [[languages]] but even the [[languages.fr.menu.main]] ? The name of the file menu.fr.toml is enough to say this menu is in french ?
Thanks my understanding of the whole staff improved a lot.
I thinks things are working now because hugo send back an error about the headings, which include the menu. So I guess it processes the menus properly now.
I would have another question about configuration : on your theme, the config.toml file itself is included into the /config/default. Does it means that, out of themes, the root of the site itself don’t need a config.toml out of the configDir ? And, why not using hugo.toml ? (may be you disegned your theme for version older than 0111, right ?