diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-08-28 08:17:16 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-08-28 08:17:16 +0200 |
commit | 371246de25c258343ef7688945c7a2d9b471214a (patch) | |
tree | f717ca779e9416c3aa7ecf5ad0ef9a1066d7eeb0 | |
parent | aa0f66b290b4e736670eb7135c76eb4e80677691 (diff) | |
download | hugo-371246de25c258343ef7688945c7a2d9b471214a.tar.gz hugo-371246de25c258343ef7688945c7a2d9b471214a.zip |
hugolib: Add a test for overriding _internal templates
-rw-r--r-- | hugolib/template_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hugolib/template_test.go b/hugolib/template_test.go index 1c60a88b3..a610b4d59 100644 --- a/hugolib/template_test.go +++ b/hugolib/template_test.go @@ -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.") +} |