Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 1.08 KB

README.md

File metadata and controls

78 lines (53 loc) · 1.08 KB

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