Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appsaeed/vite-sitemap
The plugin helps to automatically create a sitemap for Vite projects with supper easy and save your time
https://github.com/appsaeed/vite-sitemap
nodejs npm npm-package package plugins reactjs vite vite-plugin
Last synced: about 14 hours ago
JSON representation
The plugin helps to automatically create a sitemap for Vite projects with supper easy and save your time
- Host: GitHub
- URL: https://github.com/appsaeed/vite-sitemap
- Owner: appsaeed
- License: mit
- Created: 2024-05-04T16:45:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T15:11:18.000Z (8 months ago)
- Last Synced: 2025-01-17T19:13:42.774Z (7 days ago)
- Topics: nodejs, npm, npm-package, package, plugins, reactjs, vite, vite-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/vite-sitemap
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Intro
Find the Vite plugins here. They make sitemaps for Vite projects super easy. They help users and search engines find stuff on your site easily. Makes your website better and saves you time.## Installation
Install with [npm](https://www.npmjs.com/)
```sh
npm i -D vite-sitemap
```
or Install with [yarn](https://www.npmjs.com/package/yarn)
```sh
yarn add vite-sitemap
```
or Install with [pnpm](https://www.npmjs.com/package/pnpm)
```sh
pnpm install vite-sitemap
```# Usage
Use the vite plugin in your project go to vite.config.js or vite.config.ts and add the following to code in vite plugin section
````js
sitemap({
baseURL: 'www.example.com',
urls: [
"about",
"privacy-policy",
'term-and-conditions',
...
],
}),
````
Plugin section example in vite.config.ts or js
````js
import { defineConfig } from 'vite';
import sitemap from 'vite-sitemap';// https://vitejs.dev/config/
export default defineConfig({
plugins: [
sitemap({ baseURL: 'www.example.com' })
],
});
````