Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
gulp-sitemap
Advanced tools
Readme
Generate a search engine friendly sitemap.xml using a Gulp stream
Easily generate a search engine friendly sitemap.xml from your project.
:bowtie: Search engines love the sitemap.xml and it helps SEO as well.
Install with npm
$ npm install --save-dev gulp-sitemap
var gulp = require('gulp');
var sitemap = require('gulp-sitemap');
gulp.task('sitemap', function () {
gulp.src('build/**/*.html')
.pipe(sitemap({
siteUrl: 'http://www.amazon.com'
}))
.pipe(gulp.dest('./build'));
});
siteUrl
is required.index.html
will be turned into directory path /
.404.html
will be skipped automatically. No need to unglob it.required
Your website's base url. This gets prepended to all documents locations.
Type: String
Determine the output filename for the sitemap.
Type: String
Default: sitemap.xml
Gets filled inside the sitemap in the tag <changefreq>
.
Type: String
Default: daily
Gets filled inside the sitemap in the tag <priority>
.
Type: String
Default: 0.5
How to join line in the target sitemap file.
Type: String
Default: Your OS's new line, mostly: \n
How should the sitemap xml file be spaced. You can use \t
for tabs, or
with 2
spaces if you'd like.
Type: String
Default:
(4 spaces)
var gulp = require('gulp');
var sitemap = require('gulp-sitemap');
gulp.task('sitemap', function () {
gulp.src('build/**/*.html')
.pipe(sitemap({
fileName: 'sitemap.xml',
newLine: '\n',
changeFreq: 'daily',
priority: '0.5',
siteUrl: '', // no default - this is a required param
spacing: ' '
}))
.pipe(gulp.dest('./build'));
});
To grunt-sitemap for the inspiration on writing this.
MIT ©2014 Gilad Peleg
FAQs
Generate a search engine friendly sitemap.xml using a Gulp stream
We found that gulp-sitemap 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).