0.0.2 • Published 10 years ago

connect-ssiinclude v0.0.2

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

connect-ssiinclude

A middle ware for enable ssi include patterns in your html and shtml files. It's very useful during developments when you write html files in the way of modules.

It will replace pattern like <!--#include virtual="./mod/header.html"--> with the actual header.html file and transfer to your browser.

Install

$ npm install --save connect-ssiinclude 

Usage

var include = require('connect-ssiinclude');
app.use(include({root: __dirname}));

Option

include(option) // use a option object to config connect-include

{
    root: __dirname,
    encoding: "your encoding charset", // default to 'utf8'
    print: "whether to print the include information" // default to 'false'
}