mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 18:41:42 +00:00
Render 404 in default language only
This prevents 404.html from being re-rendered for each site. Fixes #3075
This commit is contained in:
parent
565a78b110
commit
154e18ddb9
1 changed files with 4 additions and 0 deletions
|
@ -239,6 +239,10 @@ func (s *Site) render404() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.owner.multilingual.enabled() && (s.Language.Lang != s.owner.multilingual.DefaultLang.Lang) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
p := s.newNodePage(kind404)
|
p := s.newNodePage(kind404)
|
||||||
|
|
||||||
p.Title = "404 Page not found"
|
p.Title = "404 Page not found"
|
||||||
|
|
Loading…
Reference in a new issue