New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sitemap-generator-cli

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sitemap-generator-cli

Create xml sitemaps from the command line.

  • 7.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
149
decreased by-81.96%
Maintainers
1
Weekly downloads
 
Created
Source

Sitemap Generator CLI

Travis David npm

Create xml sitemaps from the command line.

Generates a sitemap by crawling your site. Uses streams to efficiently write the sitemap to your drive. Is cappable of creating multiple sitemaps if threshold is reached. Respects robots.txt and meta tags.

Table of contents

Install

This module is available on npm.

$ npm install -g sitemap-generator-cli

Usage

The crawler will fetch all folder URL pages and file types parsed by Google. If present the robots.txt will be taken into account and possible rules are applied for each URL to consider if it should be added to the sitemap. Also the crawler will not fetch URL's from a page if the robots meta tag with the value nofollow is present and ignore them completely if noindex rule is present. The crawler is able to apply the base value to found links.

$ sitemap-generator [options] <url> <filepath>

When the crawler finished the XML Sitemap will be built and saved to your specified filepath. If the count of fetched pages is greater than 50000 it will be splitted into several sitemap files and create a sitemapindex file. Google does not allow more than 50000 items in one sitemap.

Example:

$ sitemap-generator http://example.com some/path/sitemap.xml

Options

$ sitemap-generator --help

  Usage: cli [options] <url>

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -f, --file                path to file including filename
    -q, --query               consider query string
    -u, --user-agent <agent>  set custom User Agent
    -v, --verbose             print details when crawling

file

Path to file to write including the filename itself. Path can be absolute or relative. Examples:

  • sitemap.xml
  • mymap.xml
  • /var/www/sitemap.xml
  • ./sitemap.myext

query

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

user-agent

Set a custom User Agent used for crawling. Default is Node/SitemapGenerator.

verbose

Print debug messages during crawling process. Also prints out a summery when finished.

License

MIT © Lars Graubner

Keywords

FAQs

Package last updated on 16 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc