Skip to content

New template system ignores layout for section index pages #13588

@tastapod

Description

@tastapod

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.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

The site has three sections, uses-section, uses-list, uses-single, which use each of these:

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™?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions