diff options
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r-- | hugolib/site_render.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go index fdac03489..5f46bd0c9 100644 --- a/hugolib/site_render.go +++ b/hugolib/site_render.go @@ -216,11 +216,16 @@ func (s *Site) render404() error { } p := s.newNodePage(kind404) + p.Title = "404 Page not found" p.Data["Pages"] = s.Pages p.Pages = s.Pages p.URLPath.URL = "404.html" + if err := p.initTargetPathDescriptor(); err != nil { + return err + } + nfLayouts := []string{"404.html"} return s.renderAndWritePage("404 page", "404.html", p, s.appendThemeTemplates(nfLayouts)...) @@ -245,6 +250,9 @@ func (s *Site) renderSitemap() error { page := s.newNodePage(kindSitemap) page.URLPath.URL = "" + if err := page.initTargetPathDescriptor(); err != nil { + return err + } page.Sitemap.ChangeFreq = sitemapDefault.ChangeFreq page.Sitemap.Priority = sitemapDefault.Priority page.Sitemap.Filename = sitemapDefault.Filename @@ -252,6 +260,11 @@ func (s *Site) renderSitemap() error { n.Data["Pages"] = pages n.Pages = pages + // TODO(bep) output + if err := page.initTargetPathDescriptor(); err != nil { + return err + } + // TODO(bep) this should be done somewhere else for _, page := range pages { if page.Sitemap.ChangeFreq == "" { @@ -284,6 +297,9 @@ func (s *Site) renderRobotsTXT() error { } n := s.newNodePage(kindRobotsTXT) + if err := n.initTargetPathDescriptor(); err != nil { + return err + } n.Data["Pages"] = s.Pages n.Pages = s.Pages |