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

very-simple-sitemap-generator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

very-simple-sitemap-generator

Very simple sitemap generator.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

very-simple-sitemap-generator

Build Status

Very simple sitemap generator.

Install

npm i very-simple-sitemap-generator
# or
yarn add very-simple-sitemap-generator

Usage

import generateSitemap from 'very-simple-sitemap-generator';

const sitemap = generateSitemap([
  'https://example.com',
  'https://example.com/test1',
  'https://example.com/test2',
]);

console.log(sitemap); // ↓↓↓

/*
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>
      https://example.com
    </loc>
  </url>
  <url>
    <loc>
      https://example.com/test1
    </loc>
  </url>
  <url>
    <loc>
      https://example.com/test2
    </loc>
  </url>
</urlset>
*/

Node.js

const generateSitemap = require('very-simple-sitemap-generator').default;

const sitemap = generateSitemap([
  'https://example.com',
  'https://example.com/test1',
  'https://example.com/test2',
]);

console.log(sitemap); // ↓↓↓

/*
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>
      https://example.com
    </loc>
  </url>
  <url>
    <loc>
      https://example.com/test1
    </loc>
  </url>
  <url>
    <loc>
      https://example.com/test2
    </loc>
  </url>
</urlset>
*/

Development

# test
npm run test

# code format
npm run fmt

Keywords

FAQs

Package last updated on 11 Nov 2020

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