mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
|
Reference in New Issue
Block a user