Render 404 in default language only

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

Fixes #3075
This commit is contained in:
Mitchell Cohen 2017-04-30 04:40:37 -04:00 committed by Bjørn Erik Pedersen
parent 565a78b110
commit 154e18ddb9

View file

@ -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"