svrx-plugin-ssi

0.1.0 • Public • Published

svrx-plugin-ssi

svrx npm

support ssi(Server Side Include) like Nginx

Usage

Please make sure that you have installed svrx already.

Via CLI

svrx -p ssi

Via API

const svrx = require('@svrx/svrx');
 
svrx({ plugins: [ 'ssi' ] }).start();

Example

index.html(entry)

<html>
    <head>
    </head>
    <body>
        <!--# include file="./top.html" -->
     <div>Middle</div>
        <!--# include file="./bottom.html" -->
    </body>
</html>

top.html in same folder

<header>Top</header>

bottom.html in same folder

<foot>Bottom</foot>

when visit index.html you will get

<html>
    <head>
    </head>
    <body>
        <header>Top</header>
     <div>Middle</div>
        <foot>Bottom</foot>
    </body>
</html>

Options

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i svrx-plugin-ssi

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

7.2 kB

Total Files

13

Last publish

Collaborators

  • leeluolee