Chance to get handlebars templating work for nickel?
sunng87 opened this issue · comments
I haven't look into nickel much, but it seems the mustach template is hard-coded into the framework because the render
function on response.
So, based on current design, is it possible to use handlebars or any other templating system?
We recently extracted the mustache specific stuff to: https://github.com/Ryman/nickel-mustache with the aim of removing it from the core in the near future. It might be worth considering as a base to start a handlebars implementation for anyone interested. I definitely don't think it's impossible!
sidenote: It would be nice in future to have a templating system that could work with a number of renderers (depending on the file extensions, etc), but there's been no work towards that as far as I'm aware.
One solution is to make templating a middleware and let render
returns something specific to downstream that templating middlewares will be interested in. Perhaps I will look into this if I got time.
FYI, https://github.com/Ryman/nickel-mustache is alive and works, but it's falling behind nickel.
Thank you. I will look into the implementation to see if it's possible to make a similar one with handlebars.
The nickel-mustache
approach has be largely abandoned, and mustache is still integrated into nickel. If there is interest, I am open to revisiting this issue.