mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
hugolib: Add a test for overriding _internal templates
This commit is contained in:
parent
aa0f66b290
commit
371246de25
1 changed files with 14 additions and 0 deletions
|
@ -706,3 +706,17 @@ a: {{ $a }}
|
|||
|
||||
b.AssertFileContent("public/index.html", `a: [a b c]`)
|
||||
}
|
||||
|
||||
func TestOverrideInternalTemplate(t *testing.T) {
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = "https://example.org"
|
||||
-- layouts/index.html --
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
-- layouts/_internal/google_analytics_async.html --
|
||||
Overridden.
|
||||
`
|
||||
b := Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/index.html", "Overridden.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue