A Gulp plugin to get all files listed in a sitemap. See sitemaps.org/protocol.html and pgilad/gulp-sitemap.
Package | gulp-sitemap-files |
Description | A Gulp plugin to get all files listed in a sitemap. |
Node Version | >= 0.9 |
npm install gulp-sitemap-files
var gulp = require('gulp');
var sitemapFiles = require('gulp-sitemap-files');
var clean = require('gulp-clean');
gulp.task('clean', function() {
gulp.src('./sitemap.xml')
.pipe(sitemapFiles('http://www.example.com/'))
.pipe(clean());
});
gulp.task('default', ['clean']);
sitemapFiles(siteUrl)
siteUrl
- string.
- It it assumed the sitemap is at the root.
- As far as default files go, only HTML files are supported right now (i.e.
http://www.example.com/
->http://www.example.com/index.html
). If you need anything more, create an issue explaining how you'd like it to work :).