The easiest way to compile modularized html files into flat html files 😊
Take a look at the documentation or clone the template repository to get started.
npm install --save-dev html-bricks
If you have multiple HTML pages and want to share certain parts of the markup between pages, you can do so very simply with html-bricks
.
A nav bar might look like this
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/contact">Contact</a>
<nav>
And you might need it inside your index.html
Assume that the navigation module is placed at src/navigation.module.html
<!DOCTYPE html>
<html>
<head>
<title>My awesome site!</title>
</head>
<body>
<module>navigation.html</module>
</body>
</html>
Intuitively, this would give you
<!DOCTYPE html>
<html>
<head>
<title>My awesome site!</title>
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/about">About</a>
<a href="/contact">Contact</a>
<nav>
</body>
</html>
This project is licensed under the MIT license.