grunt-html-include v0.1.2
html-include
How to use
@@include('filename')
Write the content of
./filename.html
here.If
./filename.html
doesn't exist, it will search for it in the directory of/components
.Besides, the
/components/filename.css
will be writeen to/css/filename.css
. So that,you should put your common HTML components and CSS in the directory of
/components
@@include('filename', {"title": "HTML Include"})
This will replace all the
@@title@@
in./filename.html
withHTML Include
.@@include('filename', {"left": "@@include('leftContent')", "right": "@@include('rightContent')"})
Support nesting include.
You could use
@@include
in the including file.Configuration
options: {
workingDir: 'src',
componentCSS: 'css/components.css'
},
files: {
'dest': ['src/index.html', 'src/*.html']
}
workingDir
: the html source directorycomponentCSS
: the file of components.cssfiles
: the files to 'html-include'