Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to create captions for figures #791

Open
silverhook opened this issue Dec 30, 2021 · 1 comment
Open

Option to create captions for figures #791

silverhook opened this issue Dec 30, 2021 · 1 comment

Comments

@silverhook
Copy link
Member

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

@Ockenfuss
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants