sitemapgen-cli
v2.1.2
Published
CLI and Node.js tool to generate sitemap.xml
Maintainers
Readme
Sitemap Generator CLI
Generate sitemap.xml using terminal or Node.js.
Install & Use
1. Run via NPX
npx sitemapgen-cli -b https://example.com -p urls.txt -o sitemap.xmlimport { generateSitemap } from 'sitemapgen-cli';
generateSitemap({
baseUrl: 'https://example.com',
paths: ['/', 'about', 'contact'],
output: 'sitemap.xml',
changefreq: 'weekly',
priority: '0.7'
});const { generateSitemap } = require('sitemapgen-cli');
generateSitemap({
baseUrl: 'https://example.com',
paths: ['/', 'about', 'contact'],
output: 'sitemap.xml',
changefreq: 'weekly',
priority: '0.7'
});url.txt or url.json file should contain the route data like this
[
"/",
"about",
"contact",
"services/web",
"blog/post-123"
]