Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chance to get handlebars templating work for nickel? #305

Open
sunng87 opened this issue Dec 1, 2015 · 5 comments
Open

Chance to get handlebars templating work for nickel? #305

sunng87 opened this issue Dec 1, 2015 · 5 comments

Comments

@sunng87
Copy link

sunng87 commented Dec 1, 2015

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?

@Ryman
Copy link
Member

Ryman commented Dec 1, 2015

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.

@sunng87
Copy link
Author

sunng87 commented Dec 2, 2015

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.

@zpallin
Copy link

zpallin commented Sep 21, 2016

FYI, https://github.com/Ryman/nickel-mustache is alive and works, but it's falling behind nickel.

Ryman/nickel-mustache#4

@sunng87
Copy link
Author

sunng87 commented Sep 21, 2016

Thank you. I will look into the implementation to see if it's possible to make a similar one with handlebars.

@jolhoeft
Copy link
Member

jolhoeft commented May 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants