Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sitemap-manager

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sitemap-manager

An easy way to create sitemaps!

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-4.17%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 04 Aug 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc