mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
tpl: Fix theme overrides when theme has old layout setup (e.g. _default)
Fixes #13715
This commit is contained in:
@@ -1103,6 +1103,23 @@ All.
|
||||
b.AssertLogContains("unrecognized render hook")
|
||||
}
|
||||
|
||||
func TestLayoutOverrideThemeWhenThemeOnOldFormatIssue13715(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
theme = "mytheme"
|
||||
-- layouts/list.html --
|
||||
layouts/list.html
|
||||
-- themes/mytheme/layouts/_default/list.html --
|
||||
mytheme/layouts/_default/list.html
|
||||
|
||||
`
|
||||
|
||||
b := hugolib.Test(t, files)
|
||||
b.AssertFileContent("public/index.html", "layouts/list.html")
|
||||
}
|
||||
|
||||
func BenchmarkExecuteWithContext(b *testing.B) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
|
Reference in New Issue
Block a user