diff --git a/deps/deps.go b/deps/deps.go index 5a97ec7f2..a0904483b 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -221,10 +221,14 @@ func (d Deps) ForLanguage(cfg DepsCfg) (*Deps, error) { return nil, err } + // The resource cache is global so reuse. + // TODO(bep) clean up these inits. + resourceCache := d.ResourceSpec.ResourceCache d.ResourceSpec, err = resource.NewSpec(d.PathSpec, d.Log, cfg.MediaTypes) if err != nil { return nil, err } + d.ResourceSpec.ResourceCache = resourceCache d.Cfg = l d.Language = l diff --git a/langs/language.go b/langs/language.go index 5eb09e10c..7d77df4e3 100644 --- a/langs/language.go +++ b/langs/language.go @@ -33,6 +33,8 @@ var globalOnlySettings = map[string]bool{ strings.ToLower("defaultContentLanguageInSubdir"): true, strings.ToLower("defaultContentLanguage"): true, strings.ToLower("multilingual"): true, + strings.ToLower("assetDir"): true, + strings.ToLower("resourceDir"): true, } // Language manages specific-language configuration. diff --git a/resource/resource.go b/resource/resource.go index 718d4d303..aedc7c22b 100644 --- a/resource/resource.go +++ b/resource/resource.go @@ -366,14 +366,6 @@ func (r *Spec) newResourceForFs(sourceFs afero.Fs, fd ResourceSourceDescriptor) } } - if fd.URLBase == "" { - fd.URLBase = r.GetURLLanguageBasePath() - } - - if fd.TargetPathBase == "" { - fd.TargetPathBase = r.GetTargetLanguageBasePath() - } - if fd.RelTargetFilename == "" { fd.RelTargetFilename = fd.Filename() }