You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
<figure><imgalt="Alt text" src="image.jpg" />
<figcaption>This is a caption.</figcaption.
</figure
OR
Convert the following Markdown:
![image with description](path-to-image.jpg)
into:
<figure><imgsrc="path-to-image.jpg"><figcaption>image with description</figcaption></figure>
Option 1. looks better from the viewpoint of generated HTML (alt text can be specified in addition to caption), but 2. looks like it would degrade gracefully, although having the text between [] inside <figcaption> instead of the alt attribute might be confusing.
Alternatives
I guess remark-macro could be used, but then images would need to be coded inside custom pseudo-tags like [img][/img]. Having a separate plugin for this functionality seems cleaner.
The text was updated successfully, but these errors were encountered:
I’m not very happy about your example 2. Alt text has important semantics for folks or computers who (for some) cannot see the image. It’s not a caption.
Subject of the feature
Plugin to surround image tags with
<figure>
and add<figcaption>
, similar togatsby-remark-figure
orgatsby-remark-figure-caption
but framework-independent. (I'd like to be able to use this feature in@nuxt/content
.)Expected behaviour
Option 1. looks better from the viewpoint of generated HTML (
alt
text can be specified in addition to caption), but 2. looks like it would degrade gracefully, although having the text between[]
inside<figcaption>
instead of thealt
attribute might be confusing.Alternatives
I guess
remark-macro
could be used, but then images would need to be coded inside custom pseudo-tags like[img][/img]
. Having a separate plugin for this functionality seems cleaner.The text was updated successfully, but these errors were encountered: