Skip to content

Add image Shortcode#14

Open
LukasGrebe wants to merge 1 commit intomaxboeck:masterfrom
LukasGrebe:master
Open

Add image Shortcode#14
LukasGrebe wants to merge 1 commit intomaxboeck:masterfrom
LukasGrebe:master

Conversation

@LukasGrebe
Copy link

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
Copy link
Author

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

@maxboeck
Copy link
Owner

maxboeck commented May 3, 2021

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants