Adds SSI-style include functionality to connect/grunt


A node conect middleware component to support shtml-style incldues.

For example, the following in an html file:

<!-- #include file="test.html" -->

will be replaced with the contents of test.html. Note that only the file= directive is supported; virtual= will be ignored.

To install, do the following

npm install --save connect-include

Then include as a middleware component to connect:

var include = require('connect-include');

If you're using Grunt, include as follows in Gruntfile.js:

module.exports = function (grunt) {
    // load all grunt tasks 
    // include connect-include 
    var ssInclude = require("connect-include");
        // ... 
        connect: {
            // ... 
            livereload: {
                options: {
                    middlewarefunction (connect) {
                        return [
                            ssInclude(, // <!--- Add this line here 
                            mountFolder(connect, '.tmp'),
            // ...