# @luban-ui/vite-plugun-sitemap

> Generate sitemap for vite site

Latest version **1.0.1** (published 2024-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @luban-ui/vite-plugun-sitemap
pnpm add @luban-ui/vite-plugun-sitemap
yarn add @luban-ui/vite-plugun-sitemap
bun add @luban-ui/vite-plugun-sitemap
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2024-07-22 |
| First published | 2023-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Season Chen season.chen.i@foxmail.com> |
| Maintainers | season.chen |
| Keywords | sitemap, typescript |

## Links

- npm: https://www.npmjs.com/package/@luban-ui/vite-plugun-sitemap
- Homepage: https://github.com/luban-dev/vite-plugun-sitemap
- npm.io page: https://npm.io/package/@luban-ui/vite-plugun-sitemap

## Dependencies (2)

- [ejs](https://npm.io/package/ejs.md) ^3.1.9
- [@types/ejs](https://npm.io/package/@types/ejs.md) ^3.1.5

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2024-07-22
- 1.0.0 — 2023-12-27

## README

# Generate sitemap for vite site

## Install

```sh
npm i -D vite @luban-ui/vite-plugun-sitemap
```

## Create config file

```ts
import { defineConfig } from 'vite';
import sitemap from '@luban-ui/vite-plugun-sitemap';

// vite.config.ts
export default defineConfig(() => {
  const root = __dirname;

  return {
    root,
    server: {
      host: '0.0.0.0',
      port: 5174
    },
    resolve: {
      alias: {
        '@': root
      }
    },
    plugins: [
      sitemap({
        domains: [
          'www.test.com'
        ],
        pages: [
          {
            path: '/',
            // languages: ['zh-CN', 'en-US'],
            // defaultLanguage: 'zh-CN',
            priority: 1.0
          }
        ],
        languages: ['zh-CN', 'en-US'],
        defaultLanguage: 'zh-CN',
        getLanguagePath: (page: string, lang: string) => `${lang}${page}`,
        filename: (domain: string) => `sitemap.xml`
      })
    ]
    // ...others
  };
});

---
_Source: https://npm.io/package/@luban-ui/vite-plugun-sitemap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
