Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jl917/rspress-plugin-sitemap
https://github.com/jl917/rspress-plugin-sitemap
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jl917/rspress-plugin-sitemap
- Owner: jl917
- License: mit
- Created: 2024-05-17T15:06:48.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-08-02T14:57:10.000Z (5 months ago)
- Last Synced: 2024-09-22T22:19:01.483Z (4 months ago)
- Language: TypeScript
- Size: 107 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rspack - rspress-plugin-sitemap - related sitemaps. (Plugins / Rspress Plugins)
README
# rspress-plugin-sitemap ![NPM Version](https://img.shields.io/npm/v/rspress-plugin-sitemap)
Rspress plugin for Automatically generate SEO(Search Engine Optimization)-related sitemaps
## Usage
```bash
npm i rspress-plugin-sitemap
yarn add rspress-plugin-sitemap
pnpm add rspress-plugin-sitemap
``````ts
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",
}),
],
});
```## Configure
This plugin supports passing in an object configuration. The properties of this object configuration are as follows:
```ts
interface Options {
domain?: string; // your domain
customMaps?: CustomMaps; // custom your sitemap
defaultPriority?: Priority; // defaultPriority 0.5
defaultChangeFreq?: ChangeFreq; // defaultPriority monthly
}
```- `domain` Customize your domain name
- `customMaps` Customize the sitemap for a specific path
- `defaultPriority` Setting default global priority
- `defaultChangeFreq` Setting default global changeFreq