Fix disabled languages regression

Fixes #11959
This commit is contained in:
Bjørn Erik Pedersen
2024-02-01 09:37:05 +01:00
parent 5dd06b4136
commit 4174a7866b
7 changed files with 113 additions and 19 deletions

View File

@@ -60,6 +60,11 @@ func (h *HugoSites) newPage(m *pageMeta) (*pageState, *paths.Path, error) {
return nil, nil, m.wrapError(err, h.BaseFs.SourceFs)
}
pcfg := m.pageConfig
if pcfg.Lang != "" {
if h.Conf.IsLangDisabled(pcfg.Lang) {
return nil, nil, nil
}
}
if pcfg.Path != "" {
s := m.pageConfig.Path