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

react-build-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-build-sitemap

simple library that generates a sitemap from your react router

  • 0.1.35
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
342
increased by46.78%
Maintainers
1
Weekly downloads
 
Created
Source

React Build Sitemap

The new way to build your sitemap from React Router

This library should replace react-router-sitemap. While react-router-sitemap has been useful, it has been abandoned for over two years, and Typescript support is tedious at best.

This library aims to take out some of the added hassle of generating your sitemap, by only requiring a few arguments to be sent to it, as opposed to having to write an entire file that involves also configuring babel to work. This cuts down your development time on the sitemap considerably.

Features

  • Autodetection of TypeScript and JavaScript.
  • Autodetection of functional or class components.
  • Ignores locked routes.
  • Generates a quick and efficient sitemap.xml file for your project based on your router.
  • Typesafe: Will work in a TypeScript project.

Future additions

  • Add the ability to check for dynamic routes, and return all.

Installation

NPM:

npm install react-build-sitemap --save-dev

Usage

In whatever file you need to import this in, do the following:

import buildSitemap from 'react-build-sitemap'

buildSitemap('./path/to/component/Component.jsx', './build/path/for/sitemap', 'http://yoururl.com')

NOTE: Do not put a / at the end of the buildPath or the url. These will be handled by the library.

Keywords

FAQs

Package last updated on 14 Aug 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