@pyyupsk/vite-plugin-sitemap
v0.2.2
Published
A modern Vite plugin for generating XML sitemaps from file-based conventions
Downloads
549
Maintainers
Readme
@pyyupsk/vite-plugin-sitemap
A TypeScript-first Vite plugin for generating XML sitemaps from a file-based convention. Zero runtime footprint.
Features
- File-based configuration - Define routes in
src/sitemap.ts - Dev mode support - Preview sitemap.xml and robots.txt during development
- Async support - Fetch routes from APIs or databases at build time
- Auto-splitting - Automatically splits large sitemaps (50,000+ URLs)
- Google extensions - Support for images, videos, news, and i18n (hreflang)
- CLI tools - Validate, preview, and generate sitemaps without building
- Zero bundle impact - Build-time only, nothing shipped to browsers
Installation
npm install --save-dev @pyyupsk/vite-plugin-sitemapQuick Start
// vite.config.ts
import { defineConfig } from "vite";
import sitemap from "@pyyupsk/vite-plugin-sitemap";
export default defineConfig({
plugins: [
sitemap({
hostname: "https://example.com",
}),
],
});Documentation
For full documentation, visit pyyupsk.github.io/vite-plugin-sitemap.
For LLM-friendly documentation, see llms.txt or llms-full.txt.
License
This project is licensed under the MIT License - see the LICENSE file for details.
