Hi,
Maybe I am doing something wrong.
I added additional language to my site and deployed to Netlify to discover, that main language is not longer in /root/ but in language folder and thats breaking all (I revert the change).
I have checked locally and run Hugo.
In public directory all languages are generated in folders, where default language shall be in root and only additional in folder.
I read that defaultContentLanguageInSubDir = ‘false’ is by default so don’t need to specify, but it doesn’t seams to work, as both languages are generated in folders.
ps. Personally don’t think it got anything to do with Netlify.
When got only single language, all posts are generated in root directory /public/
With multilanguage, default language shall be generated in /public/ and other in folder /public/en/
but, root directory is clear and all languages are generated in folders /public/pl-pl/ /public/en/` despite that Default content language is not specified to be in sub directory.
I found some old issue, maybe this is something to do with that #2422
I think I find whats the issue.
When in [languages] there is specified baseURL (in each language).
By default this shall be used to serve in different domains and not in main domain but different subfolder.
In my case I revert to baseURL to be on top of everything, and then default content is generated in root and other in subfolder (than control by defaultContentLanguageInSubDir can be used when needed).
When Hugo reads the predefined site and page parameters, it guesses your intention and converts these strings to booleans, so it is not causing a problem. But you will not get the expected results with custom parameters, at either the site or page level.
config.toml
[params]
foo = 'false'
layouts/_default/single.html
{{ if site.Params.foo }}
site.Params.foo is true
{{ else }}
site.Params.foo is false
{{ end }}