Fix taxonomy kind template lookup issue

Fixes #12193
This commit is contained in:
Bjørn Erik Pedersen
2024-03-07 08:25:34 +01:00
parent 632ad74fc5
commit 0567a3e6f1
2 changed files with 27 additions and 0 deletions

View File

@@ -911,3 +911,28 @@ title: tag-a-title-override
b.AssertFileContent("public/tags/a/index.html", "Tag: tag-a-title-override|")
}
func TestTaxonomyLookupIssue12193(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap']
[taxonomies]
author = 'authors'
-- layouts/_default/list.html --
{{ .Title }}|
-- layouts/_default/author.terms.html --
layouts/_default/author.terms.html
-- content/authors/_index.md --
---
title: Authors Page
---
`
b := Test(t, files)
b.AssertFileExists("public/index.html", true)
b.AssertFileExists("public/authors/index.html", true)
b.AssertFileContent("public/authors/index.html", "layouts/_default/author.terms.html") // failing test
}