diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-01-26 13:14:08 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-01-26 13:14:08 +0100 |
commit | 8df5d76e708238563185bac84809b34a4d395734 (patch) | |
tree | dd0633336ca4324ddbb0e850761051c16fe354bb /hugolib/site_render.go | |
parent | 8ae2c9c3d6861b5b8ef55d119a480360162acfc8 (diff) | |
download | hugo-8df5d76e708238563185bac84809b34a4d395734.tar.gz hugo-8df5d76e708238563185bac84809b34a4d395734.zip |
Fix 404 with base template regression
Fixes #6795
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r-- | hugolib/site_render.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go index a55cbb402..59f265996 100644 --- a/hugolib/site_render.go +++ b/hugolib/site_render.go @@ -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 == "" { |