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:
dekun
2026-06-05 17:01:03 +08:00
parent c4f1fb94a1
commit 4a0851628a
4 changed files with 98 additions and 22 deletions
+14 -2
View File
@@ -330,14 +330,26 @@ npm run build
部分章节引用的图片若仓库中不存在,页面可正常访问,仅图片为空。
### Q4端口被占用
### Q4导航栏「五行 / 周易 / 中医」打开是 404
**必须重新构建**`.vitepress/dist` 不会随 `git pull` 自动更新:
```bash
git pull
npm run build # 关键步骤,不可省略
npm run start # 或 systemctl restart dao-de-jing
```
构建完成后,目录下应存在例如 ` .vitepress/dist/周易/index.html`(不是只有 `README.html`)。
### Q5:端口被占用
```bash
ss -tlnp | grep 12100
# 结束占用进程或修改 server/index.js 中的 PORT 常量
```
### Q5:内网穿透后外网无法访问
### Q6:内网穿透后外网无法访问
1. 确认 Ubuntu 上 `npm run start` 正常运行
2. 确认 NPS 客户端在线,TCP 隧道状态正常