Image Caption in Jekyll
medium.com
medium.com

Photo of a cat.
is rendered as HTML as follows: <figure>
<img alt="Alt text" src="cat.jpg" />
<figcaption>
Photo of a cat.
</figcaption>
</figure>
An advantage is that this allows for Markdown inside the caption itself. Not sure if your solution handles that.[0] https://github.com/john-bokma/tumblelog
[1] http://johnbokma.com/blog/2019/09/16/rewriting-commonmark-no...