Skip to content

Commit 3222acb

Browse files
committed
fix(docsify): alias sidebar to root to avoid 404
1 parent 47fde1a commit 3222acb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- twikoo:切换页面时懒加载评论区,减少移动端卡顿并自动刷新评论
1010
- twikoo:切换页面时清理旧评论容器,避免多评论区叠加
1111
- twikoo:增加路由令牌,防止旧页面异步回流导致重复评论区
12+
- docsify:统一侧边栏到根目录,避免子目录 `_sidebar.md` 404
1213

1314
### 腾讯云 COS CORS 设置要点
1415
- 路径:对象存储 COS → 存储桶 → 安全管理 → 跨域访问 CORS

docs/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@
184184
// ,repo: 'https://github.com/SICNU-Application/wiki-SICNU'
185185
// load DIY SideBar
186186
,loadSidebar: true
187+
// 统一使用根目录侧边栏,避免子目录 404
188+
,alias: {
189+
'/.*/_sidebar.md': '/_sidebar.md'
190+
}
187191
//设置侧边栏的目录名作为正文的标题
188192
,autoHeader: true
189193
//侧边栏顶部标题

0 commit comments

Comments
 (0)