tpl: Resolve layouts/all.html for all html output formats

Fixes #13587
This commit is contained in:
Bjørn Erik Pedersen
2025-04-11 10:54:19 +02:00
parent 9221cbca49
commit c19f1f2363
2 changed files with 23 additions and 1 deletions

View File

@@ -194,3 +194,23 @@ Home.
b.AssertFileContent("public/index.html", "layouts/baseof.html")
b.AssertFileContent("public/amp/index.html", "layouts/baseof.amp.html")
}
func TestAllVsAmp(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
-- content/_index.md --
---
title: "Home"
outputs: ["html", "amp"]
---
title: "Home"
-- layouts/all.html --
All.
`
b := hugolib.Test(t, files)
b.AssertFileContent("public/index.html", "All.")
b.AssertFileContent("public/amp/index.html", "All.")
}