submit-sitemap: Node.js module to submit sitemaps to search engines
I’ve just uploaded a small Node.js module for submitting/pinging sitemaps to search engines called submit-sitemap. This is meant to be used after you’ve made updates to your site to encourage crawlers to reindex your pages.
For example, I’ve used this in the last stage of Gulp build scripts that generate and deploy static sites in the following way:
- Generate a static site using Jekyll.
- Generate a sitemap file for the static site using gulp-sitemap.
- Upload the site and sitemap to Github pages using gulp-gh-pages.
- Finally, use submit-sitemap to submit the sitemap to search engines for indexing.
To install the module:
npm install submit-sitemap --save-dev
To submit your sitemap:
The optional callback parameter can be used to respond to success and failure:
errwill be undefined.
errwill be set to an error message. This happens if the sitemap URL could not be reached or any of the sitemap submission attempts failed.
I'm available for contract work in Edinburgh and can also work remotely.