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

@@ -937,8 +937,7 @@ func newTestCfgBasic() (config.Provider, *hugofs.Fs) {
func newTestCfg(withConfig ...func(cfg config.Provider) error) (config.Provider, *hugofs.Fs) {
mm := afero.NewMemMapFs()
cfg := config.New()
// Default is false, but true is easier to use as default in tests
cfg.Set("defaultContentLanguageInSubdir", true)
cfg.Set("defaultContentLanguageInSubdir", false)
cfg.Set("publishDir", "public")
fs := hugofs.NewFromOld(hugofs.NewBaseFileDecorator(mm), cfg)