diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-01-15 20:40:39 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-01-17 16:22:33 +0100 |
commit | 20c9b6ec81171d1c586ea31d5d08b40b0edaffc6 (patch) | |
tree | 990d2709c1333663dce2ff97f16f8791fef3bac9 /hugolib/site_render.go | |
parent | f8a119b606d55aa4f31f16e5a3cadc929c99e4f8 (diff) |
resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods:
* Name
* Title
* Params
All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.
Fixes #4244
Diffstat (limited to 'hugolib/site_render.go')
-rw-r--r-- | hugolib/site_render.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/site_render.go b/hugolib/site_render.go index 8f46e33ba..43019619b 100644 --- a/hugolib/site_render.go +++ b/hugolib/site_render.go @@ -212,7 +212,7 @@ func (s *Site) renderPaginator(p *PageOutput) error { if err := s.renderAndWritePage( &s.PathSpec.ProcessingStats.PaginatorPages, - pagerNode.Title, + pagerNode.title, targetPath, pagerNode, layouts...); err != nil { return err } @@ -252,7 +252,7 @@ func (s *Site) renderRSS(p *PageOutput) error { return err } - return s.renderAndWriteXML(&s.PathSpec.ProcessingStats.Pages, p.Title, + return s.renderAndWriteXML(&s.PathSpec.ProcessingStats.Pages, p.title, targetPath, p, layouts...) } @@ -267,7 +267,7 @@ func (s *Site) render404() error { p := s.newNodePage(kind404) - p.Title = "404 Page not found" + p.title = "404 Page not found" p.Data["Pages"] = s.Pages p.Pages = s.Pages p.URLPath.URL = "404.html" |