@alexandesigner/modernjs-sitemap
v0.1.2
Published
> A basic plugin to generate the file with the application routes for https://modernjs.dev/
Downloads
3
Maintainers
Readme
🧭 Sitemap
A basic plugin to generate the file with the application routes for https://modernjs.dev/
Works with CSR/SSR/SSG
Get started
Using pnpm
pnpm install --save modernjs-sitemap
Usage
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
Development
Setup
Install the dependencies:
pnpm run install
Get Started
Run and debug the module:
pnpm run dev
Build the module for production:
pnpm run build
Enable optional features:
pnpm run new
Other 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 package
Bug?
Submit it in the issues
Get Involved
We'd love for you to help us. If you'd like to be a contributor, check out our Contributing guide