react-sitemap-generator
v1.1.6
Published
Helper to generate a sitemap for react apps
Downloads
211
Readme
react-sitemap-generator
Get started
Install
npm install --save react-sitemap-generator
or
yarn add react-sitemap-generator
Usage
Minimum requirements example
import { generateSitemap } from 'react-sitemap-generator'
import Routes from './Routes'
generateSitemap({
url: 'https://example.org',
routes: [Routes],
})
Full example
import { generateSitemap } from 'react-sitemap-generator'
import Routes from './Routes'
generateSitemap({
url: 'https://example.org',
routes: [Routes],
output: './public',
options: {
'/dashboard': { ignore: true }, // Remote path from sitemap
'/video/:id': {
slugs: { id: ['value1', 'value2'] }, // Creates multiple routes
priority: 1,
changefreq: 'never',
},
},
})