Skip to content

alexandesigner/modernjs-sitemap

Repository files navigation

🧭 Sitemap

A basic plugin to generate the file with the application routes for https://modernjs.dev/

Static Badge NPM Downloads License

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

Designed with ❤️ by Allan Alexandre. Licensed under the MIT License.

About

🧭 A basic plugin to generate the sitemap and robots files with the application routes

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published