0

I need an open source JavaScript templating engine that takes a HTML file and a "template" and produces a new HTML file (for example, the original HTML with added header and sidebar and some JavaScript).

8
  • One solution is to use XSLT, but I'd like a simpler to learn and understand (for example, by non-programmers) solution. – porton Jul 30 '20 at 2:35
  • The code should run in the user's browser. – porton Jul 30 '20 at 2:37
  • What about EJS? – Ace Aug 15 '20 at 7:39
  • @Ace It seems EJS is not what I need: EJS uses some input data (JavaScript hash) for the template, but I need to get it from a HTML file not from a JavaScript hash. – porton Aug 16 '20 at 8:06
  • I was thinking you'd take the html text and provide it as a value to the template. Is that not acceptable? – Ace Aug 17 '20 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.