mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Reset Scratch for 404
The 404 pages etc. need a better solution, but fix this issue for now. Fixes #1336
This commit is contained in:
@@ -1312,6 +1312,7 @@ func (s *Site) RenderHomePage() error {
|
|||||||
n.IsHome = false
|
n.IsHome = false
|
||||||
n.Title = "404 Page not found"
|
n.Title = "404 Page not found"
|
||||||
n.Permalink = s.permalink("404.html")
|
n.Permalink = s.permalink("404.html")
|
||||||
|
n.scratch = newScratch()
|
||||||
|
|
||||||
nfLayouts := []string{"404.html"}
|
nfLayouts := []string{"404.html"}
|
||||||
if nfErr := s.renderAndWritePage("404 page", "404.html", n, s.appendThemeTemplates(nfLayouts)...); nfErr != nil {
|
if nfErr := s.renderAndWritePage("404 page", "404.html", n, s.appendThemeTemplates(nfLayouts)...); nfErr != nil {
|
||||||
|
Reference in New Issue
Block a user