Skip to content

DevOpsolution/node-sitemap-generator-cli

 
 

Repository files navigation

Node Sitemap Generator

Travis David David Dev npm

Create xml sitemaps from the command line.

Installation

$ npm install -g sitemap-generator-cli

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
    -s, --silent               omit crawler notifications

query

Default: false

Consider URLs with query strings like http://www.example.com/?foo=bar as indiviual sites and add them to the sitemap.

$ sitemap-generator -q 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

silent

Default: false

Omit the crawler notifications of found or not found sites.

$ sitemap-generator -s example.com

About

Creates an XML-Sitemap by crawling a given site.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%