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

Add an option to wrap <img> into <figure>? #23

Open
hrw opened this issue Sep 12, 2022 · 0 comments
Open

Add an option to wrap <img> into <figure>? #23

hrw opened this issue Sep 12, 2022 · 0 comments

Comments

@hrw
Copy link
Contributor

hrw commented Sep 12, 2022

I am using liquid_tags for embedded YT videos (or rather their thumbnails) and 'yafg' Markdown extension to handle images.

This way Markdown snippet:

![NEC PC-8001A with peripherals](/files/2018/07/nec-pc-8001a-700x.jpg "NEC PC-8001A with peripherals")

Turns into:

<figure id="__yafg-figure-12">
<img alt="NEC PC-8001A with peripherals" src="[/files/2018/07/nec-pc-8001a-700x.jpg](view-source:http://localhost:8000/files/2018/07/nec-pc-8001a-700x.jpg)" title="NEC PC-8001A with peripherals">
<figcaption><span class="caps">NEC</span> <span class="caps">PC</span>-8001A with peripherals</figcaption>
</figure>

Which then looks like this (with a bit of CSS used):

obraz

figcaption {
	text-align: center;
}

figure {
	margin: 0 0 0.5em 0;
	padding: 0 0.5em 0.5em 0.5em;
	border: 1px solid lightgray;
}

But that's duplication of code in Pelican setup so maybe adding <figure> support into liquid_tags.img would be a better option?

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

No branches or pull requests

1 participant