mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 11:24:40 -04:00
Allow the same shortcode to be used with or without inline content
Fixes #934
This commit is contained in:
parent
d7f1dde194
commit
348ffb04fa
@ -193,6 +193,10 @@ of the content between the opening and closing shortcodes. If a closing
|
|||||||
shortcode is required, you can check the length of `.Inner` and provide a warning
|
shortcode is required, you can check the length of `.Inner` and provide a warning
|
||||||
to the user.
|
to the user.
|
||||||
|
|
||||||
|
A shortcode with `.Inner` content can be used wihout the inline content, and without the closing shortcode, by using the self-closing syntax:
|
||||||
|
|
||||||
|
{{</* innershortcode /*/>}}
|
||||||
|
|
||||||
The variable `.Params` contains the list of parameters in case you need to do more complicated things than `.Get`.
|
The variable `.Params` contains the list of parameters in case you need to do more complicated things than `.Get`.
|
||||||
|
|
||||||
You can also use the variable `.Page` to access all the normal [Page Variables](/templates/variables/).
|
You can also use the variable `.Page` to access all the normal [Page Variables](/templates/variables/).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user