Open tylersticka opened 4 years ago
Good suggestion @tylersticka. That list of Nunjucks features and Handlebars caveats is pretty convincing! I'd definitely be interested in switching.
I know that in a recent project, we'd considered Nunjucks and went back to Handlebars for a couple reasons:
I think both of those previous concerns shouldn't be show-stoppers here, so I'd be happy to experiment with switching to Nunjucks. Whoever takes on this work should coordinate with other devs who have work in progress so everyone's aware what's going on as this is a pretty big change.
I can look into this soon, but if anyone else is interested and would prefer to take a crack at it themselves they're more than welcome 🙂
Thanks Tyler!
We've discussed adding support for other templating languages for patterns (#22), but this issue is specifically about what we're using for this project's layouts, templates, etc.
I've noticed over the course of some recent projects and making modifications to this one that Handlebars has a number of shortcomings:
{{nested (shortcodes (of (doom)))}}
.
or@this
(whereas most other template engines cast the current element to a property name like JavaScript does).Looking at Eleventy's built-in template languages, I can't help but gaze enviously at the list of supported Nunjucks features… 👀
Especially interested in @Paul-Hebert's opinion as the originator of this repo!