feat: 引入 vitepress-plugin-llms 优化 AI 理解 (#1034)

This commit is contained in:
不如摸鱼去 2025-05-06 15:33:56 +08:00 committed by GitHub
parent 588baebfb9
commit 901c7548fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1398 additions and 592 deletions

1
components.d.ts vendored
View File

@ -7,7 +7,6 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ConditionalTest: typeof import('./src/components/conditional-test.vue')['default']
DemoBlock: typeof import('./src/components/demo-block/demo-block.vue')['default'] DemoBlock: typeof import('./src/components/demo-block/demo-block.vue')['default']
PageWraper: typeof import('./src/components/page-wraper/page-wraper.vue')['default'] PageWraper: typeof import('./src/components/page-wraper/page-wraper.vue')['default']
WdPrivacyPopup: typeof import('./src/components/wd-privacy-popup/wd-privacy-popup.vue')['default'] WdPrivacyPopup: typeof import('./src/components/wd-privacy-popup/wd-privacy-popup.vue')['default']

View File

@ -1,7 +1,7 @@
/* /*
* @Author: weisheng * @Author: weisheng
* @Date: 2023-07-27 10:26:09 * @Date: 2023-07-27 10:26:09
* @LastEditTime: 2025-03-29 15:02:23 * @LastEditTime: 2025-05-06 15:18:36
* @LastEditors: weisheng * @LastEditors: weisheng
* @Description: * @Description:
* @FilePath: /wot-design-uni/docs/.vitepress/config.mts * @FilePath: /wot-design-uni/docs/.vitepress/config.mts
@ -11,13 +11,16 @@ import { defineConfig } from 'vitepress';
import viteCompression from 'vite-plugin-compression' import viteCompression from 'vite-plugin-compression'
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from 'node:url'
import { MarkdownTransform } from './plugins/markdown-transform' import { MarkdownTransform } from './plugins/markdown-transform'
import llmstxt from 'vitepress-plugin-llms'
import enUS from './locales/en-US' import enUS from './locales/en-US'
import zhCN from './locales/zh-CN' import zhCN from './locales/zh-CN'
export default defineConfig({ export default defineConfig({
vite: { vite: {
plugins: [ plugins: [
llmstxt({
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'],
domain: 'https://wot-design-uni.cn',
}),
MarkdownTransform(), MarkdownTransform(),
viteCompression({ viteCompression({
verbose: true, verbose: true,
@ -25,7 +28,7 @@ export default defineConfig({
threshold: 10240, threshold: 10240,
algorithm: 'gzip', algorithm: 'gzip',
ext: '.gz', ext: '.gz',
}) }),
], ],
ssr: { noExternal: ['element-plus'] }, ssr: { noExternal: ['element-plus'] },
resolve: { resolve: {
@ -369,12 +372,10 @@ export default defineConfig({
}, { }, {
link: "/component/password-input", link: "/component/password-input",
text: "PasswordInput 密码输入框" text: "PasswordInput 密码输入框"
}, }, {
, {
link: "/component/signature", link: "/component/signature",
text: "Signature 签名" text: "Signature 签名"
} }]
]
}, { }, {
text: "反馈", text: "反馈",
collapsed: false, collapsed: false,

4
docs/public/_redirects Normal file
View File

@ -0,0 +1,4 @@
/llms-full.md /llms-full.txt 200!
/llms-full.txt /llms-full.txt 200!
/llms.md /llms.txt 200!
/llms.txt /llms.txt 200!

View File

@ -86,6 +86,7 @@
"@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001", "@dcloudio/uni-quickapp-webview": "3.0.0-4050720250324001",
"element-plus": "^2.3.9", "element-plus": "^2.3.9",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vitepress": "^1.6.3",
"vue": "^3.4.38", "vue": "^3.4.38",
"vue-i18n": "9.1.9" "vue-i18n": "9.1.9"
}, },
@ -146,8 +147,8 @@
"uni-read-pages-vite": "^0.0.6", "uni-read-pages-vite": "^0.0.6",
"unplugin-auto-import": "^0.17.5", "unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0", "unplugin-vue-components": "^0.26.0",
"vite": "5.2.8", "vite": "5",
"vitepress": "^1.5.0", "vitepress-plugin-llms": "^1.1.3",
"vitest": "^3.1.1", "vitest": "^3.1.1",
"vue-eslint-parser": "^9.1.0", "vue-eslint-parser": "^9.1.0",
"vue-tsc": "^2.0.29" "vue-tsc": "^2.0.29"

1937
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff