Skip to content

svrxjs/svrx-plugin-ssi

Repository files navigation

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

About

support ssi(Server Side Include) like Nginx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published