Skip to content

Indeterminate layout selection instead of warning #13630

@jmooring

Description

@jmooring
func TestIssue13630(t *testing.T) {
	t.Parallel()

	files := `
-- hugo.toml --
disableKinds = ['rss','sitemap']
-- content/p1.md --
---
title: p1
layout: foo
---
-- layouts/list.html --
layouts/list.html
-- layouts/taxononmy.html.html --
layouts/taxononmy.html.html
`

	var b *hugolib.IntegrationTestBuilder

	for range 10 {
		b = hugolib.Test(t, files)
		fmt.Println(b.FileContent("public/p1/index.html"))
	}
}

I would expect the test to emit this warning:

WARN found no layout file for "html" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

Instead, it randomly renders the single page using either the list or taxonomy template:

layouts/list.html
layouts/list.html
layouts/taxononmy.html.html
layouts/taxononmy.html.html
layouts/taxononmy.html.html
layouts/taxononmy.html.html
layouts/taxononmy.html.html
layouts/list.html
layouts/list.html
layouts/taxononmy.html.html

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions