mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02: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:
committed by
Bjørn Erik Pedersen
parent
565a78b110
commit
154e18ddb9
@@ -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"
|
||||
|
Reference in New Issue
Block a user