mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
hugolib: Add option to disable rendering of 404 page
Fixes #1889 Closes #2037
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
72bda5ad26
commit
b7efbdc12f
@@ -1769,6 +1769,10 @@ func (s *Site) renderHomePage() error {
|
||||
}
|
||||
}
|
||||
|
||||
if viper.GetBool("Disable404") {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO(bep) reusing the Home Node smells trouble
|
||||
n.URL = helpers.URLize("404.html")
|
||||
n.IsHome = false
|
||||
|
Reference in New Issue
Block a user