-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Labels
Description
Do you want to request a feature or report a bug?
bug
$ npm install -S sitemap-generator
npm WARN saveError ENOENT: no such file or directory, open '/home/actionmystique/.config/sitemap-generator/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/actionmystique/.config/sitemap-generator/package.json'
npm WARN sitemap-generator No description
npm WARN sitemap-generator No repository field.
npm WARN sitemap-generator No README data
npm WARN sitemap-generator No license field.
+ [email protected]
added 39 packages from 64 contributors and audited 58 packages in 4.133s
found 0 vulnerabilities
sitemap-generator.js:
const SitemapGenerator = require('sitemap-generator');
// create generator
const generator = SitemapGenerator('https://git.sdxlive.com', {
filepath: './sitemap.xml',
lastMod: true,
maxDepth: 9999,
maxEntriesPerFile: 50000,
stripQuerystring: true
});
// register event listeners
generator.on('done', () => {
// sitemaps created
});
// start the crawler
generator.start();
node sitemap-generator.js
leads to sitemap.xml:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://git.sdxlive.com/</loc>
<lastmod>2020-03-07</lastmod>
</url>
</urlset>
@lgraubner What am I missing?