Files
DAO_DE_JING/.vitepress/config.mts
T
dekun c4f1fb94a1 Fix 404 for README-based section pages in Express router
Resolve directory README.html paths for nav links like 周易 and 中医宝典.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 16:53:31 +08:00

48 lines
1.3 KiB
TypeScript

import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitepress'
import { missingAssetsPlugin } from './missing-assets-plugin.mjs'
import { generateSidebar } from './sidebar.mts'
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
export default defineConfig({
title: 'DAO DE JING',
description: '传统文化典籍资料库',
lang: 'zh-CN',
srcDir: '.',
srcExclude: [
'**/node_modules/**',
'**/.vitepress/**',
'**/server/**',
'**/金瓶梅/**',
'**/黄帝内经/**',
'.env.production',
'**/健康学习到150岁 - 人体系统调优不完全指南/**',
'**/梅花/**',
],
cleanUrls: true,
ignoreDeadLinks: true,
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{ text: '五行', link: '/金、木、水、火、土 - 五行/' },
{ text: '道德经', link: '/道德经/01' },
{ text: '周易', link: '/周易/' },
{ text: '中医', link: '/中医宝典/' },
],
sidebar: generateSidebar(),
outline: { level: [2, 4] },
search: {
provider: 'local',
},
},
vite: {
plugins: [missingAssetsPlugin()],
server: {
host: '0.0.0.0',
},
publicDir: path.join(root, '.vitepress', 'public'),
},
})