![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
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.
For information about sitemap properties and structure, see the wiki for sitemaps
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.Let's see an example of how we can create and output a sitemap, and then return to the original stream files:
var gulp = require('gulp');
var sitemap = require('gulp-sitemap');
var save = require('gulp-save');
gulp.task('html', function() {
gulp.src('*.html')
.pipe(save('before-sitemap'))
.pipe(sitemap({
siteUrl: 'http://www.amazon.com'
})) // Returns sitemap.xml
.pipe(gulp.dest('./dist'))
.pipe(save.restore('before-sitemap')) //restore all files to the state when we cached them
// -> continue stream with original html files
// ...
});
Your website's base url. This gets prepended to all documents locations.
Type: string
Required: true
Determine the output filename for the sitemap.
Type: string
Default: sitemap.xml
Required: false
Gets filled inside the sitemap in the tag <changefreq>
. Not added by default.
Type: string
Default: null
Valid Values: ['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never']
Required: false
Note: any falsey value is also valid and will skip this xml tag
Gets filled inside the sitemap in the tag <priority>
. Not added by default.
Type: string
Default: null
Valid Values: 0.0
to 1.0
Required: false
Note: any falsey (non-zero) value is also valid and will skip this xml tag
The file last modified time.
If null
then this plugin will try to get the last modified time from the stream vinyl file, or use Date.now()
as lastmod.
If the value is not null
- It will be used as lastmod. That gives the user the ability to manually set the lastmod
.
Type: string|Datetime
Default: null
Required: false
Note: any falsey (other than null) value is also valid and will skip this xml tag
How to join line in the target sitemap file.
Type: string
Default: Your OS's new line, mostly: \n
Required: false
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)
Required: false
An object to custom map pages to their own configuration.
This should be an array with the following structure:
Type: array
Default: []
Required: false
Example:
mappings: [{
pages: [ 'minimatch pattern' ],
changefreq: 'hourly',
priority: 0.5,
lastmod: Date.now()
},
//....
]
changefreq
, priority
and lastmod
.Type: array
Required: true
This is an array with minimatch patterns to match the relevant pages to override. Every file will be matched against the supplied patterns.
Uses multimatch to match patterns against filenames.
Example: pages: ['home/index.html', 'home/see-*.html', '!home/see-admin.html']
To grunt-sitemap for the inspiration on writing this.
MIT ©Gilad Peleg
FAQs
Generate a search engine friendly sitemap.xml using a Gulp stream
The npm package gulp-sitemap receives a total of 1,526 weekly downloads. As such, gulp-sitemap popularity was classified as popular.
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.