Fix panic for disableKinds page for content resources

Fixes #12144
This commit is contained in:
Bjørn Erik Pedersen
2024-02-24 16:52:41 +01:00
parent 189b72331e
commit 049dd1d7e0
2 changed files with 23 additions and 0 deletions

View File

@@ -193,6 +193,10 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
if err != nil {
return err
}
if pageResource == nil {
// Disabled page.
return nil
}
key = pi.Base()
rs = &resourceSource{r: pageResource}