Skip to content

Commit 5a81a3a

Browse files
committed
tpl: Add a test case
I'm not able to reproduce this, but leaving it in. Closes #13699
1 parent 6131782 commit 5a81a3a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

‎tpl/tplimpl/shortcodes_integration_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,3 +729,31 @@ SHORTCODE
729729
b.Assert(err, qt.IsNotNil)
730730
b.Assert(err.Error(), qt.Contains, `no compatible template found for shortcode "mymarkdown" in [/_shortcodes/mymarkdown.md]; note that to use plain text template shortcodes in HTML you need to use the shortcode {{% delimiter`)
731731
}
732+
733+
func TestShortcodeOnlyLanguageInBaseIssue13699(t *testing.T) {
734+
t.Parallel()
735+
736+
files := `
737+
-- hugo.toml --
738+
baseURL = 'https://example.org/'
739+
[languages]
740+
[languages.en]
741+
weight = 1
742+
disableLanguages = ['de']
743+
[languages.de]
744+
weight = 2
745+
-- layouts/_shortcodes/de.html --
746+
de.html
747+
-- layouts/all.html --
748+
{{ .Content }}
749+
-- content/_index.md --
750+
---
751+
title: home
752+
---
753+
{{< de >}}
754+
755+
`
756+
b := hugolib.Test(t, files)
757+
758+
b.AssertFileContent("public/index.html", "de.html")
759+
}

0 commit comments

Comments
 (0)