Skip to content

Commit d9ef3b2

Browse files
committed
docs(changelog): update change log and improve sidebar configuration
- Record the latest logo update details in changelog.md. - Refactor the sidebar configuration to include a manualSidebar for the changelog section and correct the default sidebar path. - Remove the cleanUrls configuration information from deploy and config documents, as it is no longer needed or relevant. - Update the deploy instructions for Pages service to reflect current deployment practices. - Add a deprecation note for the old deployment method on小组服务器.
1 parent c7929f0 commit d9ef3b2

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

docs/.vitepress/config.mts

+5-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ export default defineConfig({
1616
nav: nav(),
1717

1818
sidebar: {
19-
// 以首次匹配的侧边栏为主,因此路径需要尾随斜杠
20-
'/': dafaultSidebar(),
19+
// 以首次匹配的侧边栏为主
20+
'/changelog': manualSidebar(),
21+
// 路径需要尾随斜杠
2122
'/manual/': manualSidebar(),
2223
'/life/': lifeSidebar(),
24+
// 默认侧边栏
25+
'/': dafaultSidebar(),
2326
},
2427

2528
socialLinks: [

docs/changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
## 2023
1414

1515
- 12-18:由于之前的 WordPress 网站内容较少且存在一些样式问题,纸鹿使用 [<i class="fa-brands fa-github"></i>XUPT-Nav](https://github.com/L33Z22L11/XUPT-Nav) 同款框架试建 [<i class="fa-brands fa-github"></i>官网(2023)](https://github.com/xiyou-linuxer/XiyouLinuxWebsite2023)
16-
- 09-08:纸鹿更新了 Logo ,相比于上一版模糊的地球和企鹅图案,利用更早一版的工程文件的素材提升了图片清晰度,将微软雅黑字体更换为标小智无界黑,修正了地球的居中位置、环绕文字的偏心、书名拼写。
16+
- 09-08:纸鹿更新了 Logo,相比于上一版模糊的地球和企鹅图案,利用更早一版的工程文件的素材提升了图片清晰度,将微软雅黑字体更换为标小智无界黑,修正了地球的居中位置、环绕文字的偏心、书名拼写。

docs/manual/config.md

-14
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,3 @@
33
::: tip
44
你可以参考 VitePress 官方文档的 [自定义主题](https://vitepress.dev/zh/guide/custom-theme)[配置](https://vitepress.dev/zh/reference/site-config) 一节。
55
:::
6-
7-
## cleanUrls
8-
9-
如果使用 Nginx 运行,由于启用了 VitePress 的 `cleanUrls`,刷新时会导致页面 404。
10-
11-
你需要在 Nginx 中配置 index, try_files 和 error_page 规则:
12-
13-
```nginx
14-
index index.html;
15-
location / {
16-
try_files $uri $uri.html $uri/ =404;
17-
}
18-
error_page 404 /404.html;
19-
```

docs/manual/deploy.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@
44

55
如果你没有仓库的推送权限,请将 Remote 指向到你 Fork 的仓库。推送后发起 Pull Request。
66

7+
## 在 Pages 服务上部署
8+
9+
采用在线构建方式。
10+
11+
- 分支:`main`
12+
- 构建命令:`npm run build`
13+
- 部署目录:`docs/.vitepress/dist`
14+
715
## 在小组服务器部署
816

17+
::: info 弃用
18+
已经换用 Cloudflare Pages 部署。
19+
:::
20+
921
将仓库克隆到服务器上,使用 `update-deploy.sh` 更新部署。
1022

1123
它应当类似以下这样:
@@ -18,4 +30,17 @@ pnpm i
1830
pnpm run build
1931
sudo rm -rf $WWW_DIR
2032
sudo cp -r docs/.vitepress/dist $WWW_DIR
21-
```
33+
```
34+
### cleanUrls
35+
36+
如果使用 Nginx 运行,由于启用了 VitePress 的 `cleanUrls`,刷新时会导致页面 404。
37+
38+
需要在 Nginx 中配置规则:
39+
40+
```nginx
41+
index index.html;
42+
location / {
43+
try_files $uri $uri.html $uri/ =404;
44+
}
45+
error_page 404 /404.html;
46+
```

0 commit comments

Comments
 (0)