Skip to content

Commit c56a991

Browse files
committed
Document image_figure shortcode
1 parent 3b12c62 commit c56a991

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Diff for: templates/shortcodes/image_figure.html

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
<!-- {#
2+
Displays an image with a legend.
3+
4+
Example usage:
5+
{{ image_figure(
6+
alt="image/GIF description"
7+
src="image link"
8+
caption="image caption") }}
9+
10+
Note that the caption can contain markdown:
11+
{{ image_figure(
12+
alt="image/GIF description"
13+
src="image link"
14+
caption="image caption with some **strong** text") }}
15+
16+
But careful! Link references don't work:
17+
This doesn't work:
18+
{{ image_figure(
19+
alt="image/GIF description"
20+
src="image link"
21+
caption="[image caption][link]") }}
22+
[link]: https://example.com
23+
Use this instead:
24+
{{ image_figure(
25+
alt="image/GIF description"
26+
src="image link"
27+
caption="[image caption](https://example.com)") }}
28+
#} -->
29+
130
{% if src != "image link" %}
231
{# Only validate against placeholders if we're not in the example #}
332
{% if alt == "image/GIF description" %}

0 commit comments

Comments
 (0)