Can I include a html file in other html file?
kamlekar opened this issue · comments
Venkateshwar commented
Suppose, I have index.html
as well as header.html
. The header.html
is as follows:
<div class="header">
<%= name %>
</div>
I want to include this header in index.html. I am thinking of something like this:
<div class="page">
<%= _.template('header.html')({name: "New Header"}) %>
</div>
Note: This is not an issue but enhancement.
Sindre Sorhus commented
Nah, outside the scope of this plugin. This is strictly for compiling/precompiling Lodash/Underscore templates.
If you need more advanced things like includes/extends, see https://github.com/carlosl/gulp-nunjucks-render.
Venkateshwar commented
Thanks, that plugin seems to do the trick!! :)