soenkekluth / browsersync-ssi

SSI middleware for browser-sync
12 stars 6 forks source link

What about includes? #6

Open agriboz opened 9 years ago

agriboz commented 9 years ago

It is working well ,however, I would like to know how to get it work with includes?

i.e.

soenkekluth commented 9 years ago

includes should already be working. have you tried it with a space before --> ? <!--#include virtual="./includes/header.shtml" -->

you can also see if this fits your needs a little more: https://github.com/soenkekluth/connect-ssi

agriboz commented 9 years ago

It works very well, sorry it is my fault :) When i run gulp browsersync, cli says [BS] Runnig , however, in the browser there is no Browsersync Connected message. Is it my mistake or am i missing something?

joshvito commented 9 years ago

I followed the implementation example, and includes don't seem to be working. it is definately parsing all files, but not including the

Is there a working example I can fork?

diogoca commented 7 years ago

Hi,

I gotcha includes working with lite-server (based on browser-sync), I just added a new browsersync-ssi middleware.

bs-config.js module.exports = { server: { middleware: { 3: require('browsersync-ssi')({ baseDir: './', ext: '.html', version: '1.4.0' }) } } };

Setting:

npm install lite-server
npm install browsersync-ssi

lite-server

From a.html use: <!--#include virtual="./b.html" -->