
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gulp-slate
Advanced tools
node.js with port of tripit/slate to be included in gulp :)
will render javascript in main content
npm install gulp-slate --save
now you can setup a gulp task to handle the build
// inside of gulpfile.js
var gulp = require('gulp');
var slate = require('gulp-slate');
gulp.task('slate', function () {
return gulp.src(
[
'node_modules/gulp-slate/node_modules/slate/source/index.html.md'
]
)
.pipe(slate())
.pipe(gulp.dest('dist/'))
;
});
this is really simple since the task is already setup:
gulp slate
now go on and host the dist/ folder somewhere
python -m SimpleHTTPServer 8000
now open http://localhost:8000 in a browser of your choice, result should look exactly like http://tripit.github.io/slate/
If you need different Language groups use an Alias: angular>javascript for javascript highlighting in the angular group
you can use browserSync
I will now asume that your repository looks like this:
.
├── dist
├── docs
│ ├── custom.scss
│ └── index.html.md
├── gulpfile.js
└── package.json
npm install browser-sync --save
var gulp = require('gulp');
var slate = require('gulp-slate');
var browserSync = require('browser-sync').create();
gulp.task('slate', function () {
return gulp.src('docs/index.html.md')
.pipe(slate({
scss: 'docs/custom.scss'
}))
.pipe(gulp.dest('dist/'))
.on('end', browserSync.reload)
;
});
gulp.task('serve', ['slate'], function() {
browserSync.init({
port: 8080,
server: {
baseDir: "./dist"
}
});
gulp.watch('docs/**', ['slate']);
});
this will start browserSync, watch for changes inside of docs and refresh your browser!
gulp serve
add assets to current stream
Type: Boolean
Default true
set the filename - warning: only use one input file! else only the last one will show up
Type: String
Default index.html.md will become index.html
log level: DEBUG|INFO|WARN|ERROR
Type: String
Default WARN
Highlighting style, use any name from https://github.com/isagalaev/highlight.js/tree/master/src/styles
Type: String
Default solarized-dark
Template to render - in general you should never need to touch this
Type: String
Default src/layout.html
If you need to override certain css parameters, do not forget to include the original app.scss if you change this
Type: String
Default src/app.scss
load your own variables, default variables from slate are always loaded first
Type: String
Default null
to have a custom logo added to the page
Type: String
Default node_modules/slate/source/images/logo.png
where to load includes from, the function receives the name as well as the path to the main markdown file and should return a promise that resolves the file content
Type: Function
Default error will be loaded from includes/_error.md
FAQs
Slate API Documentation built to build with gulp
We found that gulp-slate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.