Eleventy: Add twig templates

Created on 21 Jun 2018  路  7Comments  路  Source: 11ty/eleventy

enhancement needs-votes

Most helpful comment

Twing > Twig.js any day!

All 7 comments

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

The enhancement backlog can be found here: https://github.com/11ty/eleventy/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+

This would be super helpful! I have been wanting generate a static styleguide for a Craft CMS site that relies on Twig.

I like Twig a lot, but JS implementations are not that great (at least Twigjs was not in my experience, it might have gotten better and Twing might be great).

Also when you have Nunjucks I鈥檓 not sure Twig is needed at all. (Both Nunjucks and Twig are inspired by jinja2.)

Twing > Twig.js any day!

I'd like to contribute on this.

@zachleat Apologies for commenting on a closed issue, but is this still relevant?

I clearly didn't read how issues are set up. Voted.

Like @alexcarpenter - I would love to use 11ty for a Craft CMS styleguide / design system. I also build out static sites using https://github.com/zimmen/gulp-twig . I like to use Twig because I used Twig in a corporate setting and still stick with it when I can for the smaller projects I work on now.

As a trial of 11ty, I tried to convert an existing Twig project into Nunjucks. It's great, but support for things like checks for iterable variables, passing variables using with, all the shorthand if? stuff, using a block more than once in a template - and a bunch of more powerful stuff I'd probably discover if I tried to convert a more complex project - is all dearly missed.

11ty seems very flexible - all my other bits and bobs fell into place - so this is the one issue holding me back. I'll still use it on a fresh project, but I already miss using it on some of my other work.

(I don't want to devalue the work that has gone into this project thus far. Was invited to contribute my thoughts)

Was this page helpful?
0 / 5 - 0 ratings