html-bricks

0.6.0 • Public • Published

html-bricks

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.

Installation

npm install --save-dev html-bricks

Example

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>

License

This project is licensed under the MIT license.

Package Sidebar

Install

npm i html-bricks

Weekly Downloads

0

Version

0.6.0

License

MIT

Unpacked Size

12 kB

Total Files

4

Last publish

Collaborators

  • gustavgb