Socket
Socket
Sign inDemoInstall

sitemap-manager

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sitemap-manager

An easy way to create sitemaps!


Version published
Weekly downloads
6
increased by20%
Maintainers
1
Install size
36.0 kB
Created
Weekly downloads
 

Readme

Source

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')
// or
import { SitemapManager } from 'sitemap-manager'

Step3. "New" a class

const MySitemap = new SitemapManager({
    /* Options here */
    siteURL: ''/*URL*/,
    pathPrefix: ''/*Site Prefix*/,
    outDir: ''/*Output dir*/,
})

Step4. Add urls

MySitemap.addUrl(/*Category name here*/, [
    { loc: ''/*URL*/, lastmod: ''||new Date()/*Last modification time*/, changefreq: ''||1-7/*Change frequence*/, priority: 0.0-1.0 /*Priority*/ },
    /*You can add more!*/
])

Step5. Finish!

MySitemap.finish().then(()=>{/*sth here*/}).catch((e)=>{/*sth here*/})

Check Wiki for more information.

LICENSE

MIT

Keywords

FAQs

Last updated on 22 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc