Update shortcode-templates.md

This commit is contained in:
Bjørn Erik Pedersen
2021-06-25 11:02:22 +02:00
committed by GitHub
parent e78aa48654
commit 399904959e
+5 -1
View File
@@ -102,7 +102,9 @@ most helpful when the condition depends on either of the values, or both:
If a closing shortcode is used, the `.Inner` variable will be populated with all of the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
A shortcode with content declared via the `.Inner` variable can also be declared without the inline content and without the closing shortcode by using the self-closing syntax:
A shortcode with content declared via the `.Inner` variable can also be declared without the
content and without the closing
by using the self-closing syntax:
```
{{</* innershortcode /*/>}}
@@ -367,6 +369,8 @@ More shortcode examples can be found in the [shortcodes directory for spf13.com]
## Inline Shortcodes
{{< new-in "0.52.0" >}}
Since Hugo 0.52, you can implement your shortcodes inline -- e.g. where you use them in the content file. This can be useful for scripting that you only need in one place.
This feature is disabled by default, but can be enabled in your site config: