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 async support to addShortcode #2726

Closed
zachleat opened this issue Jan 3, 2023 · 5 comments
Closed

Add async support to addShortcode #2726

zachleat opened this issue Jan 3, 2023 · 5 comments
Assignees

Comments

@zachleat
Copy link
Member

zachleat commented Jan 3, 2023

Related to the filters work in #2536 #1382

After spelunking this feature it appears we have had addAsyncShortcode and addPairedAsyncShortcode methods for quite some time (v0.10.0+)

This feature would be to add async function() support to addShortcode and addPairedShortcode.

@zachleat zachleat added this to the Eleventy 2.0.0 milestone Jan 3, 2023
@zachleat zachleat self-assigned this Jan 3, 2023
@zachleat
Copy link
Member Author

zachleat commented Jan 3, 2023

This would simplify the eleventy-img docs quite a bit too.

zachleat added a commit to 11ty/11ty-website that referenced this issue Jan 3, 2023
@zachleat
Copy link
Member Author

zachleat commented Jan 3, 2023

Shipping with 2.0.0-canary.24

@j-f1
Copy link
Contributor

j-f1 commented Jan 3, 2023

fwiw I’ve had a bunch of strange behavior around Nunjucks async shortcodes. In particular set as a block doesn’t seem to work with async shortcodes inside. Might be worth documenting that.

@zachleat
Copy link
Member Author

zachleat commented Jan 3, 2023

@j-f1 yeah you’re absolutely right, this needs to be on the docs. Making sure you’re aware of this feature too: #2108

@zachleat
Copy link
Member Author

zachleat commented Jan 3, 2023

Filed #2727 for that work!

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

No branches or pull requests

2 participants