hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 154e18ddb9ad205055d5bd4827c87f3f0daf499f
parent 565a78b1106568bac858620d8363a5167956a4f7
Author: Mitchell Cohen <mitch.cohen@me.com>
Date:   Sun, 30 Apr 2017 04:40:37 -0400

Render 404 in default language only

This prevents 404.html from being re-rendered for each site.

Fixes #3075
Diffstat:
Mhugolib/site_render.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/hugolib/site_render.go b/hugolib/site_render.go
@@ -239,6 +239,10 @@ func (s *Site) render404() error {
 		return nil
 	}
 
+	if s.owner.multilingual.enabled() && (s.Language.Lang != s.owner.multilingual.DefaultLang.Lang) {
+		return nil
+	}
+
 	p := s.newNodePage(kind404)
 
 	p.Title = "404 Page not found"