Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
Can I render a Nunjucks Template inside an 11ty shortcode?

I have a Nunjucks shortcode in an Eleventy project. It's added to configuration in eleventy.js with the Eleventy addNunjucksAsyncShortcode method. My shortcode has gotten extremely messy with complex HTML string literals, and I'd like to refactor it into using a Nunjucks template along with the logic in my shortcode Javascript file.

Is there any way I can include and render a Nunjucks template in my async shortcode, or to call a Nunjucks template with the async shortcode config (which I could then use to include methods from my Javascript logic file)? It seems like the Nunjucks object is a singleton, and I get errors trying to use it.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!