Skip to content

Commit f23a302

Browse files
refactor: ready to update the arch for better dev
1 parent 993e8d0 commit f23a302

61 files changed

Lines changed: 8812 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "平台教程标题"
3+
series: stm32f1|esp32|rp2040
4+
chapter: XX
5+
section: XX
6+
difficulty: beginner|intermediate|advanced
7+
tags: [tag1, tag2]
8+
cpp_standard: "C++XX"
9+
created: YYYY-MM-DD
10+
author: charliechen
11+
hardware:
12+
platform: STM32F103C8T6
13+
board: Blue Pill
14+
peripherals: [GPIO, UART, ...]
15+
---
16+
17+
# 教程标题
18+
19+
## 本章目标
20+
21+
一句话说明这一章要解决什么问题。
22+
23+
## 硬件原理
24+
25+
只讲这一章对应 feature 的硬件原理。
26+
27+
## HAL 接口
28+
29+
只讲这一章对应 feature 的 HAL API。
30+
31+
## 最小 Demo
32+
33+
给出可以直接跑的最小例子。
34+
35+
## C++23 封装
36+
37+
演示如何用现代 C++ 改善接口。
38+
39+
## 常见坑
40+
41+
列出最常见的问题。
42+
43+
## 练习题
44+
45+
让读者自己扩展。
46+
47+
## 可复用代码片段
48+
49+
沉淀到 code/ 目录中的模块。
50+
51+
## 本章小结
52+
53+
总结本章唯一核心 feature。

.templates/todo-template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
id: XXX
3+
title: "描述性标题"
4+
category: architecture|content|automation|branding|mkdocs|community|translation|interactive
5+
priority: P0|P1|P2|P3
6+
status: pending|in-progress|blocked|done
7+
created: YYYY-MM-DD
8+
assignee: charliechen
9+
depends_on: []
10+
blocks: []
11+
estimated_effort: small|medium|large|epic
12+
---
13+
14+
# 标题
15+
16+
## 目标
17+
18+
一段话说明要做什么和为什么。
19+
20+
## 验收标准
21+
22+
- [ ] 标准 1
23+
- [ ] 标准 2
24+
25+
## 实施说明
26+
27+
技术细节、方案、注意事项。
28+
29+
## 涉及文件
30+
31+
- path/to/file
32+
33+
## 参考资料
34+
35+
- 链接

todo/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# TODO 追踪系统
2+
3+
本目录是 Tutorial_AwesomeModernCPP 仓库的 TODO 追踪系统,按方向分类管理所有待办事项。
4+
5+
## 目录结构
6+
7+
```
8+
todo/
9+
├── architecture/ # 架构和重构 TODO(P0 优先)
10+
├── content/ # 内容创建 TODO(P0-P1 优先)
11+
├── automation/ # CI/CD 和自动化 TODO(P1 优先)
12+
├── branding/ # 品牌和推广 TODO(P2 优先)
13+
├── mkdocs/ # MkDocs 优化 TODO(P1 优先)
14+
├── community/ # 社区和贡献 TODO(P2 优先)
15+
├── translation/ # 翻译流水线 TODO(P2 优先)
16+
└── interactive/ # 交互式元素 TODO(P3 优先)
17+
```
18+
19+
## 优先级定义
20+
21+
| 级别 | 含义 | 示例 |
22+
|------|------|------|
23+
| P0 | 必须先做,阻塞其他工作 | 目录迁移、MkDocs 配置更新 |
24+
| P1 | 重要,影响下一个 Release | STM32F1 外设教程、RTOS 调度器、CI 编译 |
25+
| P2 | 显著价值提升 | ESP32/RP2040、品牌建设、翻译流水线 |
26+
| P3 | 锦上添花 | 在线编译器、汇编查看器、视频内容 |
27+
28+
## TODO 文件规范
29+
30+
每个 TODO 是一个独立的 Markdown 文件,使用以下 frontmatter:
31+
32+
```yaml
33+
---
34+
id: XXX # 唯一编号,与文件名编号一致
35+
title: "描述性标题"
36+
category: architecture|content|automation|branding|mkdocs|community|translation|interactive
37+
priority: P0|P1|P2|P3
38+
status: pending|in-progress|blocked|done
39+
created: YYYY-MM-DD
40+
assignee: charliechen
41+
depends_on: [] # 依赖的 TODO ID 列表
42+
blocks: [] # 被本 TODO 阻塞的 TODO ID 列表
43+
estimated_effort: small|medium|large|epic
44+
---
45+
```
46+
47+
文件体包含:目标、验收标准(可勾选)、实施说明、涉及文件、参考资料。
48+
49+
## 状态说明
50+
51+
| 状态 | 含义 |
52+
|------|------|
53+
| pending | 未开始 |
54+
| in-progress | 进行中 |
55+
| blocked | 被阻塞(等待依赖完成) |
56+
| done | 已完成 |
57+
58+
## 编号规则
59+
60+
- `001-009`:架构相关(architecture/)
61+
- `010-049`:内容相关(content/)
62+
- `050-069`:自动化相关(automation/)
63+
- `070-079`:品牌相关(branding/)
64+
- `080-089`:MkDocs 相关(mkdocs/)
65+
- `090-099`:社区相关(community/)
66+
- `100-109`:翻译相关(translation/)
67+
- `110-119`:交互相关(interactive/)
68+
69+
## 模板
70+
71+
新建 TODO 文件时,使用 `.templates/todo-template.md` 模板。
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
id: 001
3+
title: "创建 archive/v0-legacy 分支保留旧结构快照"
4+
category: architecture
5+
priority: P0
6+
status: pending
7+
created: 2026-04-15
8+
assignee: charliechen
9+
depends_on: []
10+
blocks: [002]
11+
estimated_effort: small
12+
---
13+
14+
# 创建 archive/v0-legacy 分支保留旧结构快照
15+
16+
## 目标
17+
18+
在开始目录重构之前,从当前 `main` 分支创建一个名为 `archive/v0-legacy` 的分支,作为旧内容结构的永久快照。任何想要查看重构前目录布局(`tutorial/` + `codes_and_assets/` 结构)的贡献者或读者,都可以切换到该分支浏览。
19+
20+
这是整个架构重构的前置安全网,确保历史内容不会因为后续的大量 `git mv` 操作而难以回溯。
21+
22+
## 验收标准
23+
24+
- [ ] `archive/v0-legacy` 分支已从当前 `main` 的 HEAD 创建
25+
- [ ] 分支已推送到远程仓库 (`origin/archive/v0-legacy`)
26+
- [ ] 主仓库 `README.md` 中新增一段说明,指引访问者前往 `archive/v0-legacy` 查看旧版内容结构
27+
- [ ] 在分支创建后,验证该分支上的目录结构完整(`tutorial/``codes_and_assets/``scripts/` 等目录均存在)
28+
- [ ] GitHub 上可以通过分支选择器看到 `archive/v0-legacy`
29+
30+
## 实施说明
31+
32+
### 创建分支
33+
34+
```bash
35+
# 确保当前在 main 分支且工作区干净
36+
git checkout main
37+
git pull origin main
38+
git status # 确认 clean
39+
40+
# 创建归档分支
41+
git branch archive/v0-legacy
42+
43+
# 推送到远程
44+
git push origin archive/v0-legacy
45+
```
46+
47+
### 更新 README.md
48+
49+
`README.md` 中合适位置(建议在"项目结构"或"快速开始"章节之前)添加如下提示框:
50+
51+
```markdown
52+
> **历史版本**: 如果你需要查看 2026 年 4 月重构之前的目录结构(`tutorial/` + `codes_and_assets/`),
53+
> 请切换到 [`archive/v0-legacy`](https://github.com/Charliechen114514/Tutorial_AwesomeModernCPP/tree/archive/v0-legacy) 分支。
54+
```
55+
56+
### 验证步骤
57+
58+
1. 在浏览器中访问 `https://github.com/Charliechen114514/Tutorial_AwesomeModernCPP/tree/archive/v0-legacy`,确认文件结构完整
59+
2. 确认分支保护:考虑在 GitHub 仓库设置中将该分支设为 protected(禁止 force push 和删除),防止意外丢失
60+
3. 确认本地 `git branch -r` 输出中包含 `origin/archive/v0-legacy`
61+
62+
### 注意事项
63+
64+
- 此操作不涉及任何文件移动或修改(除 README.md 的提示文本),风险极低
65+
- 分支命名使用 `archive/` 前缀,符合常见的归档分支命名惯例
66+
- 不要在此分支上做任何后续开发,它仅作为历史快照
67+
68+
## 涉及文件
69+
70+
- `README.md`(仅添加归档分支提示文本)
71+
- 无其他文件变更(纯 git 操作)
72+
73+
## 参考资料
74+
75+
- [Git Branching - Branch Management](https://git-scm.com/book/en/v2/Git-Branching-Branch-Management)
76+
- [GitHub: About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches)

0 commit comments

Comments
 (0)