HomeBikeshedComponents

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


{{ .Inner }}


figcaption.html


{{ .Inner }}


TODO