Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vite-sitemap

appsaeed230MIT1.3.0TypeScript support: included

The plugin helps to automatically create a sitemap. A sitemap is like a map for search engines, telling them what pages you have on your site. This makes it easier for search engines to find website and urls!

vite seo, vite sitemap generator, automatic sitemap generation for vite, improve website SEO with vite, vite plugin for search engines, vite for better SEO, generate sitemap for vite project, seo friendly vite website, appsaeed

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

npm i -D vite-sitemap

or Install with yarn

yarn add vite-sitemap

or Install with pnpm

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

sitemap({
        baseURL: 'www.example.com',
        urls: [
            "about",
            "privacy-policy",
            'term-and-conditions',
            ...
        ],
    }),

Plugin section example in vite.config.ts or js

import { defineConfig } from 'vite';
import sitemap from 'vite-sitemap';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    sitemap({ baseURL: 'www.example.com' })
  ],
});