Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.33 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.33 KB

Node Remote Sitemap Generator

Installation

npm install --save remote-sitemap-generator

Usage

var remoteSitemapGenerator = require('remote-sitemap-generator');
remoteSitemapGenerator(<url> [, options]);

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.

blacklist

Array of fully qualified urls that will not be outputted to the sitemap. Default: []

fields

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'}});

fileName

The output filename of the sitemap. Default: sitemap.xml

filePath

Location where sitemap will be saved to. Default: ./

ignoredFileTypes

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']

ignoreQueryStrings

Whether or not querystring in urls will be ignored. Default: true