New template system ignores layout for section index pages

To add to the lookup posts, I have created a minimal site+theme that demonstrates what I think is a common use case. (All my template knowledge has come from cribbing Hugo themes over the years.)

I have three sections: uses-section, uses-list, uses-single.

  • uses-section is just a standard _index.md file in a section root
  • uses-list has layout = 'list'
  • uses-single has layout = 'single'

This works as expected in hugo@145, but all three use section.html in hugo@146.

There are three page templates in the theme layouts:

  • single.html is a single page
  • list.html uses pagination
  • section.html is a stripped-back single page, to introduce a section without listing its contents

Am I just Doing This Wrong™?

Thanks,
Daniel


To reproduce (each template renders its name surrounded by == signs):

% git clone https://github.com/tastapod/template-order && cd template-order
% hugo@145 --cleanDestinationDir --quiet && grep -r == public
public/uses-section/index.html:== section ==
public/index.html:== home ==
public/tags/index.html:== list ==
public/uses-list/index.html:== list ==
public/uses-single/index.html:== single ==
public/categories/index.html:== list ==

% hugo@146 --cleanDestinationDir --quiet && grep -r == public
public/uses-section/index.html:== section ==
public/index.html:== home ==
public/tags/index.html:== list ==
public/uses-list/index.html:== section ==
public/uses-single/index.html:== section ==
public/categories/index.html:== list ==
1 Like

I submitted this as a GitHub issue.

This was fixed in v0.146.3.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.