-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Description
This is not a backwards compatibility issue, but instead something unexpected.
content/
└── s1/
└── p1.md <-- calls {{< sc >}}
layouts/
├── s1/
│ └── _shortcodes/
│ └── sc.html
└── all.html
Result: failed to extract shortcode: template for shortcode "sc" not found
You can make it work by placing a dummy sc.html in layouts/_shortcodes, but it doesn't seem like that should be necessary.
Related: https://discourse.gohugo.io/t/54334
func TestIssue13605(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','rss','section','sitemap','taxonomy','term']
-- content/s1/p1.md --
---
title: p1
---
{{< sc >}}
-- layouts/s1/_shortcodes/sc.html --
layouts/s1/_shortcodes/sc.html
-- layouts/single.html --
{{ .Content }}
`
b := hugolib.Test(t, files)
b.AssertFileContent("public/s1/p1/index.html", "layouts/s1/_shortcodes/sc.html")
}