npm install --save remote-sitemap-generator
var remoteSitemapGenerator = require('remote-sitemap-generator');
remoteSitemapGenerator(<url> [, options]);
Options are passed to the function as an object. The priority
and changefreq
of every link is calculated based on the amount ob internal links to a specific url. This can be overwritten by passing over the respective attributes in the fields
object.
Array of fully qualified urls that will not be outputted to the sitemap. Default: []
Any key-value-pair you set will be added to the <url>
in the sitemap.
Example:
var remoteSitemapGenerator = require('remote-sitemap-generator');
remoteSitemapGenerator(<url>, {fields: {priority: 1.0, changefreq: 'daily'}});
The output filename of the sitemap. Default: sitemap.xml
Location where sitemap will be saved to. Default: ./
Urls to files with these extensions will be ignored. Default: ['7z', 'atom', 'bmp', 'css', 'exe', 'gif', 'gz', 'gzip', 'ico', 'jpeg', 'jpg', 'js', 'json', 'mp3', 'mp4', 'ogg', 'pdf', 'png', 'rar', 'rss', 'ttf', 'webm', 'webp', 'woff', 'zip']
Whether or not querystring in urls will be ignored. Default: true