Are you looking for a simple yet powerful way to generate sitemaps for your Node.js projects? Meet node-sitemap-cli
, a flexible sitemap generator that makes the process straightforward and efficient.
node-sitemap-cli
is an open-source tool built to help developers automatically generate sitemaps for their web applications. Using node-html-parser under the hood, it provides a command-line interface that makes sitemap generation accessible to everyone, from beginners to experienced developers.
npm install -g node-sitemap-cli
Once installed globally, you can generate a sitemap using:
generate-sitemap
For project-specific usage:
npm install node-sitemap-cli
Add it to your package.json
scripts:
{
"scripts": {
"generate-sitemap": "generate-sitemap"
}
}
The tool comes with several configuration options to suit your needs:
Example with custom options:
generate-sitemap baseUrl=https://your-site.com outDir=./public maxDepth=5
Development Environment:
generate-sitemap baseUrl=http://localhost:3000
Production Usage:
The project is open source and welcomes contributions from the community. Whether it’s bug fixes, feature additions, or documentation improvements, your input is valuable.
node-sitemap-cli
offers a straightforward solution for generating sitemaps in Node.js projects. Its combination of simplicity and flexibility makes it a valuable tool for developers looking to improve their site’s SEO and crawlability.
Ready to try it out? Head over to node-sitemap-cli on GitHub to get started!