html-import-partials
Easily build a static html file by including html partials.
Usage
Install via npm
npm install html-import-partials
or yarn
yarn add html-import-partials
Command line:
$ html-import-partials src/*html -o dist
In Your File:
In the html file include a <include>
.
This tag will be replaced with the src
you provide.
<include src='location/of/some/file.html'/>
Examples
Basic
Simply include the files where you want them
File: ./example/src/foo.html
Foo Welcome to my website
File: ./example/src/partials/footer.html
Footer here!!!
Command: $ html-import-partials example/src/*html -o example/dist
Compiled file: ./example/dist/foo.html
Foo Welcome to my website Footer here!!!