projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
565a78b
)
Render 404 in default language only
author
Mitchell Cohen
<mitch.cohen@me.com>
Sun, 30 Apr 2017 08:40:37 +0000
(
04:40
-0400)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Sun, 30 Apr 2017 08:40:37 +0000
(10:40 +0200)
This prevents 404.html from being re-rendered for each site.
Fixes #3075
hugolib/site_render.go
patch
|
blob
|
history
diff --git
a/hugolib/site_render.go
b/hugolib/site_render.go
index a82c93137f795b1cc38eda7a23573234216bd9d1..6aeaf677a6bcf2e59cddae67eae796af6141d75f 100644
(file)
--- 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"