Skip to content

html-bricks/html-bricks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Easily compile modularized html files into flat html files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published