mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
layout: Respect Type and Layout for list template selection
This commit also has some other nice side-effects: * The layout logic is unified for all page types, which should make it less surprising * Page.Render now supports all types * The legacy "indexes" type is removed from the template lookup order. This is an undocumented type from early Hugo days. This means that having a template in, say, `/layouts/indexes/list.html` will no longer work. * The theme override logic is improved. As an example, an `index.html` in theme will now wn over a `_default/list.html` in the project, which most will expect. Fixes #3005 Fixes #3245
This commit is contained in:
@@ -1541,7 +1541,7 @@ func (s *Site) kindFromSections(sections []string) string {
|
||||
}
|
||||
|
||||
func (s *Site) layouts(p *PageOutput) ([]string, error) {
|
||||
return s.layoutHandler.For(p.layoutDescriptor, "", p.outputFormat)
|
||||
return s.layoutHandler.For(p.layoutDescriptor, p.outputFormat)
|
||||
}
|
||||
|
||||
func (s *Site) preparePages() error {
|
||||
|
Reference in New Issue
Block a user