elegant icon indicating copy to clipboard operation
elegant copied to clipboard

Option to create captions for figures

Open silverhook opened this issue 3 years ago • 1 comments

I think for images it would be really cool if we could have an option to not just create a title and alt text, but also a caption for the figure and wrap everything into a figure.

e.g.:

![Screenshot of a very cool Zsh prompt]({static}/images/Hook_Zsh_prompt.png "My cool Zsh prompt")

currently becomes:

<img alt="Screenshot of a very cool Zsh prompt" src="https://matija.suklje.name/images/Hook_Zsh_prompt.png" title="My cool Zsh prompt">

but I would like to see:

<figure>
<img alt="Screenshot of a very cool Zsh prompt" src="https://matija.suklje.name/images/Hook_Zsh_prompt.png" title="My cool Zsh prompt">
<figcaption>My cool Zsh prompt</figcaption>
</figure>

There is a simple Python plugin for this already: https://github.com/anteprandium/mdx_figcaption

silverhook avatar Dec 30 '21 02:12 silverhook

I would also be very interested in this! There is another Python-Markdown extension, which does this: Markdown_Captions

So far, it seems to work in combination with pelican and elegant.

Ockenfuss avatar Dec 09 '22 19:12 Ockenfuss