-
hello, I need to male an async shortcode, but in the page I recive a [objectPromice]. How I should do it correctly? Can you give me an expamples? Here is an example of my code
eleventyConfig.addShortcode("articleHBblock", async (title, url, text, imageUrl, alt, tags=["test", "test"])=>{
|
Beta Was this translation helpful? Give feedback.
Answered by
Dima34
Sep 30, 2021
Replies: 1 comment
-
I`ve found an aswer: You need 2 use addNunjucksAsyncShortcode to use async functions
eleventyConfig.addNunjucksAsyncShortcode("articleHBblock", async (title, url, text, imageUrl, alt, tags=["test", "test"])=>{
return `
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Dima34
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I`ve found an aswer: You need 2 use addNunjucksAsyncShortcode to use async functions
eleventyConfig.addNunjucksAsyncShortcode("articleHBblock", async (title, url, text, imageUrl, alt, tags=["test", "test"])=>{ return `