Handlebars.js: Use handlebars to compile html templates?

Created on 26 Apr 2017  ·  3Comments  ·  Source: handlebars-lang/handlebars.js

I want to have static files with html syntax and handlebars vars/functions,
and want to render them to a static html file.

I can easily achieve that with pug, the integrated commandline tool takes a .pug template and renders it to html.

I prefer to use plain html syntax and therefore would like to use handlebars,
but the cli just outputs a function to the output file.

How can I achieve that something like handlebars inputfile.hbs outputfile.html
creates a html file, that doesn't depend on any js anymore?(want to use this for mail templates)

Most helpful comment

Hi @heyitsreach, https://github.com/debrouwere/render worked for me.

All 3 comments

This project looks promising, although I have never tried it.
I have created bootprint for a similar purpose, but it may be more than you need.

@janus-reith Hey Janus, just found this while hunting down some ideas - i am trying to do the same as you, did you have any success ?
I have a HTML file that i would like to push data into using handlebars including naming it as a new .html page

Hi @heyitsreach, https://github.com/debrouwere/render worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rizen picture rizen  ·  6Comments

nknapp picture nknapp  ·  3Comments

stevenvachon picture stevenvachon  ·  7Comments

DylanPiercey picture DylanPiercey  ·  7Comments

LengYXin picture LengYXin  ·  3Comments