inHTML is a light-weight HTML templating engine written in NodeJS. It is used to pre-render saved HTML files.
Use the package manager npm to install inHTML.
npm install inhtml
<!-- CONSIDERING THAT 'welcome.html' PAGE LOOKS LIKE THIS -->
<h1>Hi, <a href="#{link}">#{name}</a></h1>
const inHTML = require('inhtml');
const welcomePage = inHTML('./welcome.html');
const finalHTML = welcomePage.render({link:'https://github.com/rohitnairtech', name:'Rohit Nair'});
console.log(finalHTML); // returns '<h1>Hi, <a href="https://github.com/rohitnairtech">Rohit Nair</a></h1>'
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.