Socket
Socket
Sign inDemoInstall

nanositemap

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nanositemap

Small sitemap generation utility


Version published
Maintainers
1
Install size
19.9 kB
Created

Readme

Source

nanositemap

NPM version

Small sitemap generation utility based on the official protocol.

installation

npm i nanositemap

example

var nanositemap = require('nanositemap')

var sm = nanositemap('https://hex22.org', {
  '/': { lastmod: '2019-07-13', priority: 0.8 }
  '/blog': { lastmod: '2019-05-11', priority: 0.2 }
  '/blog/are-you-the-owner': {}
})

API

nanositemap(str, obj|arr) -> str

Exposes a simple function that returns the full XML string. Firstly, the base url of your site and then an array of strings (urls) or an object with the following format:

{
  '/:url': {
    lastmod: string,
    changefreq: string,
    priority: number
  }
}

In the object, all attributes are optional and everything else will be filtered out.

Keywords

FAQs

Last updated on 13 Jul 2019

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