Home → Bikeshed → Components
figure.html
and figcaption.html
Shortcodes
Published:
Though the <figure>
/<figcaption>
elements are typically used for annotated images, but they don’t have to be. Instead of assuming that figures will always be images, this lets you specify markdown between a {{% figure %}}
/{{% figcaption %}}
block along with optional attributes for the respective HTML elements.
Source Code
Except for the tag name, these shortcodes are the exact same. I’m wondering if I should just make a generic block shortcode which just changes the tag name.
figure.html
figcaption.html
{{ .Inner }}
TODO
- Allow for non-closing shortcodes. Main blocker is there doesn’t seem to be a way to detect if a shortcode is a block or not.