]> git.maquefel.me Git - brevno-suite/hugo/commit
tpl: Narrow down the usage of plain text shortcodes when rendering HTML
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 16 May 2025 08:36:05 +0000 (10:36 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 18 May 2025 10:48:24 +0000 (12:48 +0200)
commit61317821e463f8c6e980de6d0c27188148464c04
tree82689cf053834d6998b7cda12470455da8e03d30
parent6142bc701cc3b0b0ac59287d22e81de552e1382b
tpl: Narrow down the usage of plain text shortcodes when rendering HTML

After this commit, if you want to resolve `layouts/_shortcodes/myshortcode.txt` when rendering HTML content, you need to use the `{{%` shortcode delimiter:

```
{{% myshortcode %}}
```

This should be what people would do anyway, but we have also as part of this improved the error message to inform about what needs to be done.

Note that this is not relevant for partials.

Fixes #13698
hugolib/shortcode.go
hugolib/shortcode_test.go
tpl/tplimpl/shortcodes_integration_test.go
tpl/tplimpl/templatedescriptor.go
tpl/tplimpl/templatestore.go
tpl/tplimpl/templatestore_integration_test.go