hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 78962a14f86bd6404b467739eb6cc382aecc64c3
parent ac99ceccac3511f2d4f3c642dfd3b844ba28f900
Author: Nicholas Whittier <imperialwicket@gmail.com>
Date:   Thu, 26 Jun 2014 13:41:29 -0600

Allows 404 templates from themes/THEME directories.

Diffstat:
Mhugolib/site.go | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git 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