diff options
author | Wolfgang Müller | 2021-08-09 18:48:43 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-08-09 18:54:43 +0200 |
commit | 341e39b179ad2ce0b9b7fce059ea2243fb4c609a (patch) | |
tree | d0c46986fbf8e08d5c67722c59d0f3f382d46120 | |
parent | 17bcb985751ba81c8c832e5a869e0e6c8641c990 (diff) | |
download | zunzuncito-341e39b179ad2ce0b9b7fce059ea2243fb4c609a.tar.gz |
templates: Render markdown in img's figcaption
The img shortcode inserts, along the picture itself, a figcaption
element containing a brief description. We may want to include links or
other HTML elements in that description. This is not possible right now
because we insert the caption content verbatim.
This commit changes the img shortcode such that markdown is now rendered
inline for the figcaption element.
Diffstat (limited to '')
-rw-r--r-- | templates/shortcodes/img.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html index 6b4eca4..b339382 100644 --- a/templates/shortcodes/img.html +++ b/templates/shortcodes/img.html @@ -4,6 +4,6 @@ <img src="{{ resize_image(path=url, width=500, op="fit_width", format=format | default(value="jpg")) }}" alt="{{ alt }}" /> </a> {% if caption -%} - <figcaption class="smaller">{{ caption }}</figcaption> + <figcaption class="smaller">{{ caption | markdown(inline=true) | safe }}</figcaption> {% endif -%} </figure> |