mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl: Warn and skip non-hook templates inside /layouts/_markup
Fixes #13577
This commit is contained in:
@@ -844,6 +844,21 @@ All.
|
||||
b.AssertLogContains("Duplicate content path")
|
||||
}
|
||||
|
||||
// Issue #13577.
|
||||
func TestPrintPathWarningOnInvalidMarkupFilename(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
-- layouts/all.html --
|
||||
All.
|
||||
-- layouts/_markup/sitemap.xml --
|
||||
`
|
||||
b := hugolib.Test(t, files, hugolib.TestOptWarn())
|
||||
|
||||
b.AssertLogContains("unrecognized render hook")
|
||||
}
|
||||
|
||||
func BenchmarkExecuteWithContext(b *testing.B) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
|
Reference in New Issue
Block a user