mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user