unlockopen / www.unlockopen.com-v4

V4 of the UnlockOpen website
0 stars 1 forks source link

Allow setting a caption for images in markdown #20

Closed tobie closed 6 months ago

tobie commented 6 months ago

Leverage renderImage method from markdown-it-eleventy-img plugin to allow adding image captions in markdown.

![alt text](url "caption")

Should turn into something like:

<figure>
    <source>[...]</source>
    <figcaption>caption</figcaption>
</figure>

The output should be consistent with the shortcode image renderer and ideally leverage the same codebase.

Caption must support inline markdown.

tobie commented 6 months ago

OK, so apparently this short hand (![alt text](url "caption")) is what caused the memory issue I spent half my weekend debugging.

OK, so it turns out it's not this, it's just the image is getting processed when it's not using a shortcode.

Can we fix this?

tobie commented 6 months ago

Filed #21 to handle the markdown issue first.

madrilene commented 6 months ago

Fixed / added in https://github.com/unlockopen/www.unlockopen.com-v4/pull/22.