Skip to content

Commit dda2084

Browse files
committed
docs: add wiki for homepage update and release
1 parent 2d831d9 commit dda2084

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

docs/wiki-homepage-publish.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Wiki: 手动修改首页并发布上线
2+
3+
这份文档用于记录 `tech-lab-notes` 的首页修改与发布流程,适合日常手动维护。
4+
5+
## 1. 进入仓库
6+
7+
```bash
8+
cd /data/sunwenbo/pto/tech-lab-notes
9+
```
10+
11+
## 2. 修改首页文件
12+
13+
站点首页是 `docs/README.md`(不是仓库根目录 `README.md`)。
14+
15+
```bash
16+
vim docs/README.md
17+
```
18+
19+
或:
20+
21+
```bash
22+
nano docs/README.md
23+
```
24+
25+
如果你同时调整导航顺序,需要再编辑:
26+
27+
```bash
28+
vim mkdocs.yml
29+
```
30+
31+
## 3. 本地预览(推荐)
32+
33+
```bash
34+
python3 -m venv .venv
35+
source .venv/bin/activate
36+
pip install -r requirements.txt
37+
mkdocs serve
38+
```
39+
40+
预览地址:
41+
42+
```text
43+
http://127.0.0.1:8000
44+
```
45+
46+
## 4. 提交并推送
47+
48+
```bash
49+
git add docs/README.md mkdocs.yml
50+
git commit -m "docs: optimize homepage"
51+
git push origin main
52+
```
53+
54+
## 5. 等待自动部署
55+
56+
仓库已配置 GitHub Actions 工作流 `deploy-docs`,推送到 `main` 会自动构建并发布。
57+
58+
查看最近一次运行:
59+
60+
```bash
61+
gh run list -R WenboCodes/tech-lab-notes --workflow deploy-docs --limit 1
62+
```
63+
64+
查看指定运行详情:
65+
66+
```bash
67+
gh run view <run_id> -R WenboCodes/tech-lab-notes
68+
```
69+
70+
## 6. 线上访问地址
71+
72+
```text
73+
https://wenbocodes.github.io/tech-lab-notes/
74+
```
75+
76+
## 7. 常见问题
77+
78+
1. 页面没更新
79+
先看 Actions 是否成功;其次检查是否推到了 `main` 分支。
80+
81+
2. 首页改了但导航没变
82+
确认 `mkdocs.yml``nav` 是否同步更新。
83+
84+
3. 本地预览失败
85+
确认虚拟环境已激活,并重新执行 `pip install -r requirements.txt`

0 commit comments

Comments
 (0)