eleventastic icon indicating copy to clipboard operation
eleventastic copied to clipboard

Add image Shortcode

Open LukasGrebe opened this issue 3 years ago • 2 comments

Hi, i noticed package.json lists "@11ty/eleventy-img": "^0.8.2" as a dependancy. I've added the shortcode as per eleventy docs.

I've also modified the the shortcodes to be asnyc

LukasGrebe avatar Apr 24 '21 06:04 LukasGrebe

hold on - I just noticed moving all shortcakes to async does not seem to work in some cases.

I'm not sure how to reproduce it (yet) but it appears that using the icon shortcode in nested njk templates leads to an error

LukasGrebe avatar May 02 '21 09:05 LukasGrebe

this is a good addition, thank you!

regarding the async issue, I would opt to register just the image shortcode as async and leave the icon shortcode as-is, since it doesn't return a promise. may have to rethink that "register all shortcodes in a loop" approach in the eleventy.js config though...

maxboeck avatar May 03 '21 12:05 maxboeck