Fix section 404 by rewriting README pages to index.html
Generate VitePress rewrites for subdirectory README.md and simplify Express page resolution. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { defineConfig } from 'vitepress'
|
||||
import { missingAssetsPlugin } from './missing-assets-plugin.mjs'
|
||||
import { generateRewrites } from './rewrites.mts'
|
||||
import { generateSidebar } from './sidebar.mts'
|
||||
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
||||
@@ -11,6 +12,7 @@ export default defineConfig({
|
||||
description: '传统文化典籍资料库',
|
||||
lang: 'zh-CN',
|
||||
srcDir: '.',
|
||||
rewrites: generateRewrites(),
|
||||
srcExclude: [
|
||||
'**/node_modules/**',
|
||||
'**/.vitepress/**',
|
||||
|
||||
Reference in New Issue
Block a user