Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@alex-drocks/react-snap-sitemap

alex-drocks180MIT3.0.0

Create a sitemap post react-snap SSR

automatic sitemap generator, react-snap, arcadian-group/react-snap-sitemap fork

readme

React Snap Sitemap

A companion package for react-snap.

This package allows you to generate a sitemap.xml based off the created directories and files produced by react-snap.

Installation

npm install -D @alex-drocks/react-snap-sitemap

Usage

Add & react-snap-sitemap --base-url=http://example.com/ to the end of your postBuild script after you've run the react-snap command. For example:

"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"postbuild": "react-snap & react-snap-sitemap --base-url=https://finance-d.com/ --add-slash=true --change-frequency=daily"
},

To blacklist specific urls, add them with --black-list={url},{url2},...

You can also add --change-frequency=always|daily|weekly|monthly|yearly|never.

If you need trailing slashes at the end of your URLs add --add-slash=true