mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
@@ -113,10 +113,11 @@ func ApplyProjectConfigDefaults(cfg config.Provider, mod Module) error {
|
||||
source := cfg.GetString(d.key)
|
||||
componentsConfigured[d.component] = true
|
||||
|
||||
return []Mount{Mount{
|
||||
return []Mount{{
|
||||
// No lang set for layouts etc.
|
||||
Source: source,
|
||||
Target: d.component}}
|
||||
Target: d.component,
|
||||
}}
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -166,7 +167,6 @@ func ApplyProjectConfigDefaults(cfg config.Provider, mod Module) error {
|
||||
var mounts []Mount
|
||||
for _, dirKey := range dirKeys {
|
||||
if componentsConfigured[dirKey.component] {
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -240,7 +240,6 @@ func decodeConfig(cfg config.Provider, pathReplacements map[string]string) (Conf
|
||||
c.Imports[i] = imp
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for i, mnt := range c.Mounts {
|
||||
@@ -393,11 +392,9 @@ func getStaticDirs(cfg config.Provider) []string {
|
||||
}
|
||||
|
||||
func getStringOrStringSlice(cfg config.Provider, key string, id int) []string {
|
||||
|
||||
if id >= 0 {
|
||||
key = fmt.Sprintf("%s%d", key, id)
|
||||
}
|
||||
|
||||
return config.GetStringSlicePreserveString(cfg, key)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user