aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_render.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-01-26 13:14:08 +0100
committerBjørn Erik Pedersen <[email protected]>2020-01-26 13:14:08 +0100
commit8df5d76e708238563185bac84809b34a4d395734 (patch)
treedd0633336ca4324ddbb0e850761051c16fe354bb /hugolib/site_render.go
parent8ae2c9c3d6861b5b8ef55d119a480360162acfc8 (diff)
downloadhugo-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.go12
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 == "" {