Node Sitemap Generator

Create xml sitemaps from the command line.

Installation
$ npm install -g sitemap-generator
Usage
$ sitemap-generator [options] <url>
The crawler will fetch all sites matching folder URLs and file types parsed by Google. If present the robots.txt
will be taken into account and possible rules are applied for any URL to consider if it should be added to the sitemap.
Tip: Omit the URL protocol, the crawler will detect the right one.
Important: Executing the sitemap-generator with sites using HTML base
-tag will not work in most cases as it is not parsed by the crawler.
Options
$ sitemap-generator --help
Usage: sitemap-generator [options] <url>
Options:
-h, --help output usage information
-V, --version output the version number
-q, --query consider query string
-f, --filename [filename] sets output filename
-p, --path [path] specifies output path
query
Consider URLs with query strings like http://www.example.com/?foo=bar
as indiviual sites and add them to the sitemap.
$ sitemap-generator --query example.com
filename
Default: sitemap
Specify an alternate filename for the XML output file. The .xml
file extension is optional, it will be added automatically.
$ sitemap-generator --filename=sitemap-foo example.com
path
Default: .
Specify an alternate output path for the generated sitemap. Default is the current working directory.
$ sitemap-generator --path=../foo/bar example.com