keystonejs/generator-keystone

missing ejs

GaryMatthews opened this issue · 2 comments

Spending so much time trying to convert one of the templates in the generator-keystone over to ejs and it is a pain in the ass. simply not worth the effort. i know html and javascript so ejs makes sense as this is the technology i am working with but none of the provided template systems make sense i dont know why anybody would think they are a good idea. if your writing a html page then html templates make sense if they are 'HTML'. ive given up on this keystonejs is not for me as it requires learning a new template language to get started with the examples and to use the generator. 'BULLSHIT' that will never happen.

If you've never written a yeoman generator before I can see where it becomes frustrating. I've been there but don't lose hope! Don't bother making a generator. If I were you I would start by running the nunjucks generator which does a good job of keeping your HTML clean. You can use that as a starting point to go in an replace what you need to hookup EJS. Start in 'keystone.js' and use the 'consolidate' library like nunjucks does which will help you. You can remove any of the custom nunjucks stuff. Then just continue with the site layout and index page, replacing the nunjucks tags. Might be easier if you don't generate all the different sections (blog/photos) first. Should be pretty straight forward. Also, don't be afraid to look at the nunjucks or other templating documentation. I think you'll like it once it sinks in.

@JedWatson think this can be closed now ;)