Fix defaultContentLanguageInSubdir with only 1 language

Fixes #10064
This commit is contained in:
Bjørn Erik Pedersen 2023-07-07 18:41:10 +02:00
parent 6c9ea022a9
commit 92e86702ea
12 changed files with 154 additions and 101 deletions

View file

@ -1042,8 +1042,8 @@ func (c *hugoBuilder) rebuildSites(events []fsnotify.Event) error {
if c.fastRenderMode {
c.withConf(func(conf *commonConfig) {
// Make sure we always render the home pages
for _, l := range conf.configs.Languages {
langPath := h.GetLangSubDir(l.Lang)
for _, l := range conf.configs.ConfigLangs() {
langPath := l.LanguagePrefix()
if langPath != "" {
langPath = langPath + "/"
}