feat: add vite-plugin-pages-sitemap (#303)

Co-authored-by: JB Aubrée <jb.aubree@digitsole.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Jean-Baptiste AUBRÉE 2022-03-06 21:16:26 +01:00 committed by GitHub
parent 8b0302cb2b
commit 1848561b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 864 additions and 787 deletions

View File

@ -85,6 +85,7 @@ Mocking up web app with <b>Vitesse</b><sup><em>(speed)</em></sup><br>
- [Vue I18n](https://github.com/intlify/vue-i18n-next) - Internationalization
- [`vite-plugin-vue-i18n`](https://github.com/intlify/vite-plugin-vue-i18n) - Vite plugin for Vue I18n
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - Sitemap generator
- [`@vueuse/head`](https://github.com/vueuse/head) - manipulate document head reactively
### Coding Style
@ -154,6 +155,7 @@ When you use this template, try follow the checklist to update your info properl
- [ ] Change the author name in `LICENSE`
- [ ] Change the title in `App.vue`
- [ ] Change the hostname in `vite.config.ts`
- [ ] Change the favicon in `public`
- [ ] Remove the `.github` folder which contains the funding info
- [ ] Clean up the READMEs and remove routes

View File

@ -85,6 +85,7 @@
- [Vue I18n](https://github.com/intlify/vue-i18n-next) - 国际化
- [`vite-plugin-vue-i18n`](https://github.com/intlify/vite-plugin-vue-i18n) - Vue I18n 的 Vite 插件
- [VueUse](https://github.com/antfu/vueuse) - 实用的 Composition API 工具合集
- [`vite-ssg-sitemap`](https://github.com/jbaubree/vite-ssg-sitemap) - 站点地图生成器
- [`@vueuse/head`](https://github.com/vueuse/head) - 响应式地操作文档头信息
### 编码风格
@ -146,6 +147,7 @@ pnpm i # 如果你没装过 pnpm, 可以先运行: npm install -g pnpm
- [ ] 在 `LICENSE` 中改变作者名
- [ ] 在 `App.vue` 中改变标题
- [ ] 在 `vite.config.ts` 更改主机名
- [ ] 在 `public` 目录下改变favicon
- [ ] 移除 `.github` 文件夹中包含资助的信息
- [ ] 整理 README 并删除路由

View File

@ -55,6 +55,7 @@
"vite-plugin-pwa": "^0.11.13",
"vite-plugin-vue-layouts": "^0.6.0",
"vite-ssg": "^0.17.11",
"vite-ssg-sitemap": "^0.1.4",
"vitest": "^0.5.9",
"vue-tsc": "^0.32.1"
}

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
User-agent: *
Allow: /

View File

@ -2,6 +2,7 @@ import path from 'path'
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import Pages from 'vite-plugin-pages'
import generateSitemap from 'vite-ssg-sitemap'
import Layouts from 'vite-plugin-vue-layouts'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
@ -80,7 +81,7 @@ export default defineConfig({
// https://github.com/antfu/vite-plugin-pwa
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.svg', 'robots.txt', 'safari-pinned-tab.svg'],
includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
manifest: {
name: 'Vitesse',
short_name: 'Vitesse',
@ -122,6 +123,7 @@ export default defineConfig({
ssgOptions: {
script: 'async',
formatting: 'minify',
onFinished() { generateSitemap() },
},
optimizeDeps: {