|
1 | 1 | /* |
2 | 2 | * @Author: weisheng |
3 | 3 | * @Date: 2023-07-27 10:26:09 |
4 | | - * @LastEditTime: 2025-03-29 15:02:23 |
| 4 | + * @LastEditTime: 2025-05-06 15:18:36 |
5 | 5 | * @LastEditors: weisheng |
6 | | - * @Description: |
| 6 | + * @Description: |
7 | 7 | * @FilePath: /wot-design-uni/docs/.vitepress/config.mts |
8 | 8 | * 记得注释 |
9 | 9 | */ |
10 | 10 | import { defineConfig } from 'vitepress'; |
11 | 11 | import viteCompression from 'vite-plugin-compression' |
12 | 12 | import { fileURLToPath, URL } from 'node:url' |
13 | 13 | import { MarkdownTransform } from './plugins/markdown-transform' |
| 14 | +import llmstxt from 'vitepress-plugin-llms' |
14 | 15 | import enUS from './locales/en-US' |
15 | 16 | import zhCN from './locales/zh-CN' |
16 | | - |
17 | | - |
18 | 17 | export default defineConfig({ |
19 | 18 | vite: { |
20 | 19 | plugins: [ |
| 20 | + llmstxt({ |
| 21 | + ignoreFiles: ['reward/*', 'index.md', 'README.md', 'en-US/*.md', 'en-US/**/*.md', 'ads/*', 'guide/cases.md', 'guide/changelog.md', 'guide/join-group.md', 'guide/typography.md'], |
| 22 | + domain: 'https://wot-design-uni.cn', |
| 23 | + }), |
21 | 24 | MarkdownTransform(), |
22 | 25 | viteCompression({ |
23 | 26 | verbose: true, |
24 | 27 | disable: false, |
25 | 28 | threshold: 10240, |
26 | 29 | algorithm: 'gzip', |
27 | 30 | ext: '.gz', |
28 | | - }) |
| 31 | + }), |
29 | 32 | ], |
30 | 33 | ssr: { noExternal: ['element-plus'] }, |
31 | 34 | resolve: { |
@@ -72,20 +75,20 @@ export default defineConfig({ |
72 | 75 | ...zhCN |
73 | 76 | }, |
74 | 77 | 'en-US': { |
75 | | - label: 'English', |
| 78 | + label: 'English', |
76 | 79 | lang: 'en-US', |
77 | 80 | ...enUS, |
78 | 81 | } |
79 | 82 | }, |
80 | 83 | head: [ |
81 | 84 | ['link', { rel: 'icon', href: '/favicon.ico' }], |
82 | 85 | ['link', { rel: 'stylesheet', href: '/petercatai/assistant.min.css' }], |
83 | | - ['script', {src: '/petercatai/react.development.js' }], |
84 | | - ['script', {src: '/petercatai/react-dom.development.js' }], |
85 | | - ['script', {src: '/petercatai/dayjs.min.js' }], |
86 | | - ['script', {src: '/petercatai/antd.js' }], |
87 | | - ['script', {src: '/petercatai/lottie.js' }], |
88 | | - ['script', {src: '/petercatai/assistant.min.js' }], |
| 86 | + ['script', { src: '/petercatai/react.development.js' }], |
| 87 | + ['script', { src: '/petercatai/react-dom.development.js' }], |
| 88 | + ['script', { src: '/petercatai/dayjs.min.js' }], |
| 89 | + ['script', { src: '/petercatai/antd.js' }], |
| 90 | + ['script', { src: '/petercatai/lottie.js' }], |
| 91 | + ['script', { src: '/petercatai/assistant.min.js' }], |
89 | 92 | ['script', {}, ` |
90 | 93 | !function(p){"use strict";!function(t){var s=window,e=document,i=p,c="".concat("https:"===e.location.protocol?"https://":"http://","sdk.51.la/js-sdk-pro.min.js"),n=e.createElement("script"),r=e.getElementsByTagName("script")[0];n.type="text/javascript",n.setAttribute("charset","UTF-8"),n.async=!0,n.src=c,n.id="LA_COLLECT",i.d=n;var o=function(){s.LA.ids.push(i)};s.LA?s.LA.ids&&o():(s.LA=p,s.LA.ids=[],o()),r.parentNode.insertBefore(n,r)}()}({id:"3J4q4tM6fN0n1fbZ",ck:"3J4q4tM6fN0n1fbZ"}); |
91 | 94 | `], |
@@ -152,10 +155,10 @@ export default defineConfig({ |
152 | 155 | }, { |
153 | 156 | text: '更新日志', |
154 | 157 | link: '/guide/changelog', |
155 | | - },{ |
| 158 | + }, { |
156 | 159 | text: '⭐ 案例', |
157 | 160 | link: '/guide/cases', |
158 | | - },{ |
| 161 | + }, { |
159 | 162 | text: '加群沟通', |
160 | 163 | link: '/guide/join-group', |
161 | 164 | } |
@@ -219,10 +222,10 @@ export default defineConfig({ |
219 | 222 | { |
220 | 223 | text: '更新日志', |
221 | 224 | link: '/guide/changelog', |
222 | | - },{ |
| 225 | + }, { |
223 | 226 | text: '⭐ 案例', |
224 | 227 | link: '/guide/cases', |
225 | | - },{ |
| 228 | + }, { |
226 | 229 | text: '加群沟通', |
227 | 230 | link: '/guide/join-group', |
228 | 231 | } |
@@ -369,12 +372,10 @@ export default defineConfig({ |
369 | 372 | }, { |
370 | 373 | link: "/component/password-input", |
371 | 374 | text: "PasswordInput 密码输入框" |
372 | | - }, |
373 | | - , { |
| 375 | + }, { |
374 | 376 | link: "/component/signature", |
375 | 377 | text: "Signature 签名" |
376 | | - } |
377 | | - ] |
| 378 | + }] |
378 | 379 | }, { |
379 | 380 | text: "反馈", |
380 | 381 | collapsed: false, |
@@ -436,7 +437,7 @@ export default defineConfig({ |
436 | 437 | link: "/component/number-keyboard", |
437 | 438 | text: "NumberKeyboard 数字键盘" |
438 | 439 | }] |
439 | | - }, |
| 440 | + }, |
440 | 441 | { |
441 | 442 | text: "数据展示", |
442 | 443 | collapsed: false, |
|
0 commit comments