Fix 404 with base template regression

Fixes #6795
This commit is contained in:
Bjørn Erik Pedersen
2020-01-26 13:14:08 +01:00
parent 8ae2c9c3d6
commit 8df5d76e70
2 changed files with 27 additions and 1 deletions

View File

@@ -251,7 +251,17 @@ func (s *Site) render404() error {
return err
}
templ := s.lookupLayouts("404.html")
var d output.LayoutDescriptor
d.Kind = kind404
templ, found, err := s.Tmpl().LookupLayout(d, output.HTMLFormat)
if err != nil {
return err
}
if !found {
return nil
}
targetPath := p.targetPaths().TargetFilename
if targetPath == "" {