claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 184 forks source link

EJS views #69

Open strawhatgami opened 9 years ago

strawhatgami commented 9 years ago

Hi,

I'm adapting Jingo to my app, where views are written in EJS. These views produces similar outputs compared to those written in jade.

claudioc commented 9 years ago

Hi!

to be honest, if I will start jecho now I'd probably use EJS. Jade has some nice feature, but the ability to use HTML templates with just some additional markup (the ejs one) is – imho – a major reason to use it.

The "problem" is that there are users who have changed jingo templates for their own purpose and I don't think that changing the template system would be fair. The problem is maintenance: using both syntaxes together, means that I'd have to change two separate sets of files which is not a good idea.

Thank you very much for the PR, anyway: maybe I'll merge it for Jingo 3 :)

ryanvarick commented 9 years ago

I am using something similar locally, except with Handlebars instead. It might be a good idea to think about how Jingo could support user-provided "themes" with whatever layout engine Express can handle, perhaps even installable via NPM. That way people could still customize, but you wouldn't have to support two (or more!) separate layouts.

strawhatgami commented 9 years ago

@claudioc Glad you like it! @ryanvarick I'm adaptating Jingo to mount it as a subapp, and the ability to set an arbitrary layout I need (among others) looks like "user-provided themes". More in next PR soon :-)