Skip to content

Commit

Permalink
Render 404 in default language only
Browse files Browse the repository at this point in the history
This prevents 404.html from being re-rendered for each site.

Fixes #3075
  • Loading branch information
mitchchn authored and bep committed Apr 30, 2017
1 parent 565a78b commit 154e18d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hugolib/site_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 154e18d

Please sign in to comment.