You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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#3005Fixes#3245
// We may fix this in the future, but the layout handling in Render isn't built
174
-
// for list pages.
175
-
func (p*Page) checkRender() bool {
176
-
ifp.Kind!=KindPage {
177
-
helpers.DistinctWarnLog.Printf(".Render only available for regular pages, not for of kind %q. You probably meant .Site.RegularPages and not.Site.Pages.", p.Kind)
178
-
returnfalse
179
-
}
180
-
returntrue
181
-
}
182
-
183
166
// OutputFormats holds a list of the relevant output formats for a given resource.
0 commit comments