RandomEtc / ejs-locals

Express 3.x layout, partial and block template functions for the EJS template engine.
298 stars 63 forks source link

How do I include jade partials? #29

Closed samholmes closed 11 years ago

samholmes commented 11 years ago
<?- partial('nav.jade') ?>

This includes nav.jade as EJS and doesn't render it with the jade engine. How do I do what I need to do?

samholmes commented 11 years ago

Shouldn't the partial() function render the file with the proper rendering engine and locals, then return the results?

RandomEtc commented 11 years ago

This isn't something I've ever needed, hence it isn't implemented. If you like Jade you should use it for everything - it has more features :)

I believe multiple format functionality was added to https://github.com/publicclass/express-partials a while after I forked it to add layout and block support. Unforunately we've diverged somewhat so it will probably be a pain to port over.

FWIW I'm not using this library myself any more and I don't consider lack of support for jade to be a bug (it's "ejs" locals after all) so I'm closing this issue. If you modify the library to work with other engines and it's not too crufty I'll gladly merge a pull request.

samholmes commented 11 years ago

I'm migrating from EJS to Jade and my intention is to eventually use Jade exclusively. However, while migrating, I'll need to mix the two.