diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-08-14 12:04:17 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-08-14 12:04:17 +0200 |
commit | 56c61559b2a9f9c4cec3f6c6de9bcc5095a78b57 (patch) | |
tree | d9ff8edaac9ccb64284bc28919609e0015c8ce3f /hugolib/paths/paths.go | |
parent | 78f8475a054a6277d37f13329afd240b00dc9408 (diff) |
Only duplicate resource output in multihost mode
Yesterday's commit was a little too agressive.
This commit makes sure that the duplication of resources to public/en etc. is only performed in multihost mode.
See #5058
Diffstat (limited to 'hugolib/paths/paths.go')
-rw-r--r-- | hugolib/paths/paths.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hugolib/paths/paths.go b/hugolib/paths/paths.go index 10acf0cb3..625d68ec6 100644 --- a/hugolib/paths/paths.go +++ b/hugolib/paths/paths.go @@ -139,10 +139,8 @@ func New(fs *hugofs.Fs, cfg config.Provider) (*Paths, error) { absResourcesDir = FilePathSeparator } - multilingual := cfg.GetBool("multilingual") - var multihostTargetBasePaths []string - if multilingual { + if languages.IsMultihost() { for _, l := range languages { multihostTargetBasePaths = append(multihostTargetBasePaths, l.Lang) } @@ -167,7 +165,7 @@ func New(fs *hugofs.Fs, cfg config.Provider) (*Paths, error) { themes: config.GetStringSlicePreserveString(cfg, "theme"), - multilingual: multilingual, + multilingual: cfg.GetBool("multilingual"), defaultContentLanguageInSubdir: cfg.GetBool("defaultContentLanguageInSubdir"), DefaultContentLanguage: defaultContentLanguage, |