hugolib: Add option to disable rendering of 404 page

Fixes #1889
Closes #2037
This commit is contained in:
digitalcraftsman
2016-04-03 00:22:31 +02:00
committed by Bjørn Erik Pedersen
parent 72bda5ad26
commit b7efbdc12f
3 changed files with 13 additions and 1 deletions

View File

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