sitemap-manager
An easy way to create sitemaps!
Features
- Easy to use 😲
- Work fast 🚀
- Xml with xsl. For search engines or for human visions? Don't choose, for both! 🥳
- Put different pages into different sitemaps. 🧺
Usage
Step 1. Install sitemap-manager.
// For npm users
npm install sitemap-manager --save
// For yarn users
yarn add sitemap manager
Step2. Import sitemap-manager
const { SitemapManager } = require('sitemap-manager')
import { SitemapManager } from 'sitemap-manager'
Step3. "New" a class
const MySitemap = new SitemapManager({
siteURL: '',
pathPrefix: '',
outDir: '',
})
Step4. Add urls
MySitemap.addUrl(, [
{ loc: '', lastmod: ''||new Date(), changefreq: ''||1-7, priority: 0.0-1.0 },
])
Step5. Finish!
MySitemap.finish().then(()=>{}).catch((e)=>{})
Check Wiki for more information.
LICENSE
MIT