mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Must update PathSpec on SiteInfo per language
This commit is contained in:
parent
85a2d81e3c
commit
4d4c7791ac
2 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,8 @@ func doTestMultiSitesMainLangInRoot(t *testing.T, defaultInSubDir bool) {
|
|||
require.Equal(t, "", frSite.Info.LanguagePrefix)
|
||||
}
|
||||
|
||||
require.Equal(t, "/blog/en/foo", enSite.Info.pathSpec.RelURL("foo", true))
|
||||
|
||||
doc1en := enSite.Pages[0]
|
||||
doc1fr := frSite.Pages[0]
|
||||
|
||||
|
|
|
@ -823,6 +823,7 @@ func (s *Site) setCurrentLanguageConfig() error {
|
|||
viper.Set("currentContentLanguage", s.Language)
|
||||
// Cache the current config.
|
||||
helpers.InitConfigProviderForCurrentContentLanguage()
|
||||
s.Info.pathSpec = helpers.CurrentPathSpec()
|
||||
return tpl.SetTranslateLang(s.Language)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue