Skip to content

Commit ac523da

Browse files
authored
feat: resolve the 404 page issue (#40)
1 parent 1d15a8d commit ac523da

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.vitepress/config.mts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ const resolveSubmoduleRelativePathsPlugin = (options: { source: string; target:
3333
export default defineConfig({
3434
title: 'OpenTiny NEXT',
3535
description: 'OpenTiny NEXT',
36+
// 忽略死链检查(true 会跳过 VitePress 的 dead link 报错)
37+
ignoreDeadLinks: true,
3638
outDir: 'dist',
37-
srcExclude: ['**/README.md'],
39+
srcExclude: ['**/README*.md','**/develop-demo-en.md','**/theme-en.md'],
3840
base: process.env.VITEPRESS_BASE || '/',
3941
head: [['link', { rel: 'icon', href: '/logo-mini.svg' }]],
4042
vite: {
43+
// 允许以大写扩展名结尾的图片/静态资源被当作资产处理,避免被 import-analyze 当作 JS 解析
44+
assetsInclude: ['**/*.{png,PNG,jpg,JPG,jpeg,JPEG,gif,GIF,webp,WEBP,svg,SVG}'],
4145
plugins: [vueJsx(), resolveSubmoduleRelativePathsPlugin([{
4246
source: path.resolve(rootDir, 'demos'),
4347
target: path.resolve(rootDir, 'tiny-robot/docs/demos'),
@@ -46,6 +50,7 @@ export default defineConfig({
4650
resolve: {
4751
alias: {
4852
'@opentiny/tiny-robot-style': '../../tiny-robot/packages/components/dist/style.css',
53+
'@demos': path.resolve(__dirname, '../../tiny-vue/examples/sites/demos/pc'), // 根据你的项目结构调整路径
4954
},
5055
},
5156
},

0 commit comments

Comments
 (0)