-1

I need to generate a file from a template, but I need it to create an actual html file. When I use templating engines like pug or haml, I've got one pug (haml) file that gets rendered with the variables I provide.

But I need to have a template with variables and then generate a new, actual static html file created from that template with said variables.

How can I do that?

3
  • nodejs.org/api/… Commented Apr 21, 2020 at 9:54
  • Did you read the question? What you linked and the post this was marked as a "duplicate" of does not answer my question whatsoever. Commented Apr 21, 2020 at 10:09
  • You want to know how to create a new static file from a template. You already know how to use a template engine. The duplicate covers the remaining bit. It does answer it. Commented Apr 21, 2020 at 10:15

1 Answer 1

-1

You can use something like handlebars. Handle bars CLI allows to convert the template to HTML file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.