Create figure shortcode that works with image shortcode
Using Hugo’s {{< figure >}}
shortcode with our {{< image >}}
shortcode throws a big old runtime error for Hugo.
Needs to support all of Hugo’s default figure
parameters:
-
src
URL of the image to be displayed. -
link
If the image needs to be hyperlinked, URL of the destination. -
target
Optional target attribute for the URL if link parameter is set. -
rel
Optional rel attribute for the URL if link parameter is set. -
alt
Alternate text for the image if the image cannot be displayed. -
title
Image title. -
caption
Image caption. Markdown within the value of caption will be rendered. -
class
class attribute of the HTML figure tag. -
height
height attribute of the image. -
width
width attribute of the image. -
attr
Image attribution text. Markdown within the value of attr will be rendered. -
attrlink
If the attribution text needs to be hyperlinked, URL of the destination.
We should also support these for the image
shortcode, for cross-compatibility (though we needn’t promote the less advisable/accessible options like target
and title
).