Fuse multiple HTML files into one
npm i -D html-fusion
npx fusion <input_html> -o <output_html>
npx fusion <input_html> -o <output_html> -w <directory_to_watch>
Include HTML files by listing their filepaths relative to the HTML file from which they are included. For example, when including files from the same foler, you only need to specify a filename.
Don't use absolute paths, they are not supported.
<body>
<!-- Include multiple HTML files -->
<!-- E.g. from a nested folder or from the same folder -->
{{
components/title.html
components/nav.html
button.html
}}
<!-- Single HTML include -->
{{ components/footer }}
</body>
<!-- components/nav.html -->
<nav>
<a>Content</a>
<a>More stuff</a>
<nav>