Rspress plugin for Automatically generate SEO(Search Engine Optimization)-related sitemaps
npm i rspress-plugin-sitemap
yarn add rspress-plugin-sitemap
pnpm add rspress-plugin-sitemap
import { defineConfig } from "rspress/config";
import sitemap from "rspress-plugin-sitemap";
export default defineConfig({
plugins: [
sitemap({
domain: "https://rspress.dev",
customMaps: {
"/sample": {
loc: "/sample",
lastmod: "2024-04-27T07:44:43.422Z",
priority: "0.7",
changefreq: "always",
},
},
defaultChangeFreq: "monthly",
defaultPriority: "0.5",
}),
],
});
This plugin supports passing in an object configuration. The properties of this object configuration are as follows:
interface Options {
domain?: string; // your domain
customMaps?: CustomMaps; // custom your sitemap
defaultPriority?: Priority; // defaultPriority 0.5
defaultChangeFreq?: ChangeFreq; // defaultPriority monthly
}
domain
Customize your domain namecustomMaps
Customize the sitemap for a specific pathdefaultPriority
Setting default global prioritydefaultChangeFreq
Setting default global changeFreq