lgraubner / sitemap-generator

Easily create XML sitemaps for your website.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Great tool! One small addition.

mgifford opened this issue · comments

I'd just add to the documentation that you need to create a file (say with the filename example_instructions) with:

const SitemapGenerator = require('sitemap-generator');

// create generator
const generator = SitemapGenerator('http://example.com', {
  stripQuerystring: false
});

// register event listeners
generator.on('done', () => {
  // sitemaps created
});

// start the crawler
generator.start();

Edit it to remove the http://example.com

Then execute it with:
node example_instructions

Pretty simple addition, but speeds things up.

It's not as simple as some of those that allow you to specify all this from the command line without creating an example file, but your script seems to crawl more effectively than others I've tried.

I think the example is sufficient. If you just want to run it from the command line you could also use the CLI Version.

Having an example file could result in more support question as some people might not understand they have to replace example.com.