-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Description
I have created a minimal site+theme that demonstrates what I think is a common use case: using layouts to change the rendering of section index pages.
The theme has three page templates in layouts:
single.htmlis a single pagelist.htmluses paginationsection.htmlis a stripped-back single page, to introduce a section without listing its contents
The site has three sections, uses-section, uses-list, uses-single, which use each of these:
- uses-section/_index.md is just a simple index file in a section root
- uses-list/_index.md is the same, with
layout = 'list' - uses-single/_index.md has
layout = 'single'
This works as expected in v0.145 (each template includes its name surrounded by == signs):
% git clone https://github.com/tastapod/template-order && cd template-order
% hugo@145 --cleanDestinationDir --quiet && grep -r == public | grep uses
public/uses-section/index.html:== section ==
public/uses-list/index.html:== list ==
public/uses-single/index.html:== single ==but in v0.146, all three render with section.html:
% hugo@146 --cleanDestinationDir --quiet && grep -r == public | grep uses
public/uses-section/index.html:== section ==
public/uses-list/index.html:== section ==
public/uses-single/index.html:== section ==Am I just Doing This Wrong™?