svrx-plugin-ssi
v0.1.0
Published
support ssi(Server Side Include) like Nginx
Downloads
5
Readme
svrx-plugin-ssi
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