Lego2012
10/11/2016 - 8:25 PM

The following task will run after the build task, it will send a request to Google and Bing, informing them that the site has been updated a

The following task will run after the build task, it will send a request to Google and Bing, informing them that the site has been updated and that they should re-index the site.

var gulp = require('gulp'),
    request = require('request');

gulp.task('seo', ['build'], function(cb) {
  request('http://www.google.com/webmasters/tools/ping?sitemap={URL TO YOUR SITEMAP.XML}');
  request('http://www.bing.com/webmaster/ping.aspx?siteMap={URL TO YOUR SITEMAP.XML}');
  cb();
});