Open aciccarello opened 4 years ago
Could be done via a markdown plugin instead of eleventy. markdown-it-implicit-figures seems like an option.
This would probably involve implementing arve0/markdown-it-implicit-figures#20 or using markdown-it-image-figures
An alternative would to use a paired shortcode to combine markdown and liquid.
{% image
"Andean cock-of-the-rock -- [Photo by Jerry Thompson](https://commons.wikimedia.org/wiki/File:Rupicola_peruviana_%28male%29\_-San_Diego_Zoo-8a.jpg) [[CC BY 2.0](https://creativecommons.org/licenses/by/2.0)]"
"float"
%}
![bird with a bright orange body and head, black wings and a gray back](/assets/img/peru-andean-cock-of-the-rock.jpg)
{% endimage %}
Wrong issue number...
The current include for images makes markdown editing harder. I would prefer to use the title option of markdown links as the caption. By using a plugin to re-write the image tag, we could red the title attibute and use that in the output. That still leaves the width formatting (full width, float), however some markdown processors allow a
{:attrName="attrValue"}
syntax which adds modifiers to the image. We could use this to pass the values. One complication is that we want to support markdown in the caption.Current syntax
Desired syntax
Expected Output
Blocked by aciccarello/aciccarello.github.io#30
References