mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 14:16:06 +00:00
Update shortcode templating
This commit is contained in:
1 parent
09d0120df6
commit
fa1c7d1f1d
1 file changed
+1
-1
@@ -262,7 +262,7 @@ The following example is contrived but demonstrates the concept. Assume you have
|
|||||||
```
|
```
|
||||||
{{% /code %}}
|
{{% /code %}}
|
||||||
|
|
||||||
You also have an `image` shortcode with a single named `src` parameter that may or may not be called within `gallery`, as well as other shortcodes you've created for your site. When called inside a parent shortcode like `gallery`, you want the output HTML to inherit a CSS class from the value given to its parent:
|
You also have an `image` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes so that the parent defines the context of each `image`:
|
||||||
|
|
||||||
{{% code file="layouts/shortcodes/image.html" %}}
|
{{% code file="layouts/shortcodes/image.html" %}}
|
||||||
```html
|
```html
|
||||||
|
|||||||
Reference in new issue
Block a user