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 better image support for markdown content #19

Open
lyzadanger opened this issue Feb 18, 2024 · 2 comments
Open

Add better image support for markdown content #19

lyzadanger opened this issue Feb 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@lyzadanger
Copy link
Owner

Currently adding images manually in blog posts and content, e.g.

![Best Meats Sold Anywhere](https://res.cloudinary.com/dfsssdwbu/image/upload/c_fit,w_1200/v1707427658/best-meats_wztdic.jpg)

Note the use of Cloudinary transform API in the URL here. And there's no ability to caption images, nor...various things.

What I'd like is:

  • Ability to caption images (possibly use <figure> element or similar)
  • Ability to auto-craft CDN URLs for images

Given that I don't want to pollute my markdown source/couple it to 11ty, I might come at this by writing markdown-it plugins. e.g. might crib from https://github.com/windmaomao/markdown-it-figure-caption for captioning.

@lyzadanger lyzadanger added the enhancement New feature or request label Feb 18, 2024
@lyzadanger
Copy link
Owner Author

lyzadanger added a commit that referenced this issue Feb 24, 2024
Use recently-added `markdown` shortcode for this. NB: `og:description`
content is still plaintext.

Fixes #19
@lyzadanger
Copy link
Owner Author

Also handy reference: https://github.com/solution-loisir/markdown-it-eleventy-img/blob/master/index.js

(That project is a markdown-it plugin that uses Eleventy's eleventy-img plugin additionally, to resize/transform the images themselves. I believe I'd like to stay away from doing the image transforms and instead just transform the markdown-to-html output. I am probably more keen on adding figure elements and captions than using a picture element. So sue me.)

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

No branches or pull requests

1 participant