From: Nicholas Whittier Date: Thu, 26 Jun 2014 19:41:29 +0000 (-0600) Subject: Allows 404 templates from themes/THEME directories. X-Git-Tag: v0.12~76 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=78962a14;p=brevno-suite%2Fhugo Allows 404 templates from themes/THEME directories. --- diff --git a/hugolib/site.go b/hugolib/site.go index 32c73741..f3d9bc6a 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -738,13 +738,14 @@ func (s *Site) RenderHomePage() error { } } - if a := s.Tmpl.Lookup("404.html"); a != nil { - n.Url = helpers.Urlize("404.html") - n.Title = "404 Page not found" - n.Permalink = s.permalink("404.html") - - layouts := []string{"404.html"} - return s.render(n, "404.html", s.appendThemeTemplates(layouts)...) + n.Url = helpers.Urlize("404.html") + n.Title = "404 Page not found" + n.Permalink = s.permalink("404.html") + + nfLayouts := []string{"404.html"} + nfErr := s.render(n, "404.html", s.appendThemeTemplates(nfLayouts)...) + if nfErr != nil { + return nfErr } return nil