Skip to content

Indeterminate template lookup order re. the all template and templates with and without lang #13636

@jmooring

Description

@jmooring

Given this layouts directory:

layouts/
├── all.en.html
├── all.en.html.html
├── all.html
├── all.html.html
├── page.en.html
├── page.en.html.html
├── page.html
├── page.html.html
├── single.en.html
├── single.en.html.html
├── single.html
└── single.html.html

And this content:

content/
├── s1/
│   └── p1.md
└── _index.md

The template lookup order (from most specific to least specific) for content/s1/p1.md is indeterminate:

Run 1 Run 2 Run 3
page.en.html page.en.html page.en.html
page.en.html.html page.en.html.html page.en.html.html
page.html all.en.html single.en.html
single.en.html page.html single.en.html.html
single.en.html.html single.en.html all.en.html
page.html.html single.en.html.html all.en.html.html
all.en.html page.html.html page.html
all.en.html.html all.en.html.html page.html.html
single.html single.html single.html
single.html.html single.html.html single.html.html
all.html all.html all.html
all.html.html all.html.html all.html.html

Tested with hugo v0.147.0-DEV-fd238a1de126fd977407a1cf6f3081bae053574d+extended+withdeploy linux/amd64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions