New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-html-ssi2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-html-ssi2

基于gulp-html-ssi修改匹配规则,适应nginx服务器的ssi路径规则

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-html-ssi

NPM version Dependency Status

gulp-html-ssi plugin for gulp

Introduction

gulp-html-ssi allows you to compile your html files with includes.

gulp-html-ssi looks through your files for special html comments that it will use to parse them and do the include correctly.

Usage

Install

npm install --save-dev gulp-html-ssi

Sample gulpfile.js

Then, add it to your gulpfile.js:

var gulp = require('gulp'),
	includer = require('gulp-html-ssi');

gulp.task('htmlSSI', function() {
	gulp.src('./source/**/*.html')
		.pipe(includer())
		.pipe(gulp.dest('./build/'));
});

gulp.task('default', ['htmlSSI']);

gulp.task('watch', function() {
	gulp.watch(['./source/**/*.html'], function(event) {
		gulp.start('default');
	});
});

API

File naming convention

gulp-html-ssi requires files follow a particular naming convention.

Files that you want to include in other files begin with _.

Files that you want to use to build the resulting static pages can be named however you want, as long as they don't begin with _.

Include

This is the simplest use case. Simply put the following html comment

<!--#include file="_filename" -->

or

<!--#include virtual="_filename" -->

Example

file1.html

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
<!--#include file="__file2.html" -->
</body>
</html>

__file2.html

  hello world

Results

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  hello world
</body>
</html>

License

MIT License

Keywords

FAQs

Package last updated on 19 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc