Reset Scratch for 404
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 7 Aug 2015 18:30:01 +0000 (20:30 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 7 Aug 2015 18:30:01 +0000 (20:30 +0200)
The 404 pages etc. need a better solution, but fix this issue for now.

Fixes #1336

hugolib/site.go

index 9f750c1a178788ee3aba9c1f8c639252bde5b73b..a8ca835ef8a6f0a016b59bf690338e1795a68d24 100644 (file)
@@ -1312,6 +1312,7 @@ func (s *Site) RenderHomePage() error {
        n.IsHome = false
        n.Title = "404 Page not found"
        n.Permalink = s.permalink("404.html")
+       n.scratch = newScratch()
 
        nfLayouts := []string{"404.html"}
        if nfErr := s.renderAndWritePage("404 page", "404.html", n, s.appendThemeTemplates(nfLayouts)...); nfErr != nil {