A basic plugin to generate the file with the application routes for https://modernjs.dev/
Works with CSR/SSR/SSG
Using pnpm
pnpm install --save modernjs-sitemapUsage
import { sitemapPlugin } from 'modernjs-sitemap'
plugins: [..., sitemapPlugin({
basepath: 'https://example.com',
routes: [{ urlPath: '/', priority: '0.2' }] // Extend route config
})],Props to extend configuration
| Props | Type | Description |
|---|---|---|
| basepath | string | url to site |
| routes | array | with fields urlPath, priority, changefreq |
| robots | boolean or object | true or object with fields userAgent, disallow, allow |
Install the dependencies:
pnpm run installRun and debug the module:
pnpm run devBuild the module for production:
pnpm run buildEnable optional features:
pnpm run newOther commands:
pnpm run lint # Lint and fix source files
pnpm run change # Add a new changeset
pnpm run bump # Update version and changelog via changeset
pnpm run release # Release the packageSubmit it in the issues
We'd love for you to help us. If you'd like to be a contributor, check out our Contributing guide
Designed with ❤️ by Allan Alexandre. Licensed under the MIT License.