@zdigital/sitemap-generator
v2.0.6
Published
A sitemap.xml generator.
Downloads
3
Readme
@zdigital/sitemap-generator
A sitemap.xml generator.
Install
$ npm i @zdigital/sitemap-generator --save
Usage
const sitemapGenerator = require('@zdigital/sitemap-generator');
if (app.get('env') === 'development') {
const filePath = `${__dirname}/public/sitemap.xml`;
const highPriority = [
'https://example.com',
];
const lowPriority = [
'https://example.com/about',
'https://example.com/contact',
];
sitemapGenerator(highPriority, lowPriority, filePath, () => {
console.log('Sitemap.xml generated!');
});
}