vite-nuxt-auto-sitemap
v0.1.2
Published
sitemap auto generation for Nuxt3
Downloads
23
Maintainers
Readme
vite-nuxt-auto-sitemap
Nuxt3 automatically generates sitemap file
Usage
Install
npm i vite-nuxt-auto-sitemap -D
Add it to nuxt.config.ts
// nuxt.config.ts
import autoSitemap from "vite-nuxt-auto-sitemap"
export default {
vite: {
plugins: process.env.NODE_ENV === 'production' ?
viteNuxtautoSitemap({
host: 'https://xxx.com'
}),
: '',
}
};
Configuration
Current available options:
autoSitemap({
/**
* Required domain name
*/
host: '' | []
/**
* Page directory relative to process directory
*/
dirPath: './pages',
/**
* The relative to process directory path of sitemap output
*/
sitemapOutPath: './public/sitemap.xml'
})