mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
tpl: Add a test case
I'm not able to reproduce this, but leaving it in. Closes #13699
This commit is contained in:
@@ -729,3 +729,31 @@ SHORTCODE
|
||||
b.Assert(err, qt.IsNotNil)
|
||||
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`)
|
||||
}
|
||||
|
||||
func TestShortcodeOnlyLanguageInBaseIssue13699(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
baseURL = 'https://example.org/'
|
||||
[languages]
|
||||
[languages.en]
|
||||
weight = 1
|
||||
disableLanguages = ['de']
|
||||
[languages.de]
|
||||
weight = 2
|
||||
-- layouts/_shortcodes/de.html --
|
||||
de.html
|
||||
-- layouts/all.html --
|
||||
{{ .Content }}
|
||||
-- content/_index.md --
|
||||
---
|
||||
title: home
|
||||
---
|
||||
{{< de >}}
|
||||
|
||||
`
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/index.html", "de.html")
|
||||
}
|
||||
|
Reference in New Issue
Block a user