Mike Riethmuller avatar Mike Riethmuller

Understanding Filters, Shortcodes and Data in 11ty

Screenshot of “Understanding Filters, Shortcodes and Data in 11ty”

I've been using Eleventy for 2 years now (already! 😮), and I thought Mike's post would be a nice one to send to beginners, but I actually learned something!

What makes data incredibly powerful is that, for some template languages at least, it can be more than a static value. In Nunjucks templates, but not Liquid, 11ty data can also be a function. This means we can create something similar to shortcodes by exporting a function from a data file

🤯

I had not idea, I will have to experiment it!