-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# pc-nrfconnect-ppk 源码解析——项目架构 | ||
|
||
不同于仅仅对项目的目录结构和核心依赖包做念 PPT 式的技术介绍,这里我们尝试学习一下使用 C4 模型来解构 ppk 的源码。 | ||
|
||
## 什么是 C4 模型 | ||
|
||
[Home | C4 model](https://c4model.com/) | ||
|
||
形象地说,C4 模型就像一张源码地图,可以帮助你理解一个中大型项目的整体布局和架构设计。 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# C4 模型文档汉化 | ||
|
||
仅供学习参考,禁止用于任何商业目的,一经发现,律师函警告! | ||
|
||
原网站:[https://c4model.com/](https://c4model.com/) | ||
|
||
汉化仓库:[https://github.com/Freedyool/c4model-cn](https://github.com/Freedyool/c4model-cn) | ||
|
||
本项目的宗旨是尽量全面地覆盖所有的文档内容,我会在这里记录汉化进展和个人总结,欢迎开源社区中更多人的加入,感谢你们! | ||
|
||
| 目录级别 | 页面索引 | 预期完成时间 | 当前进度 | | ||
| -------- | ------------------------- | ------------ | -------- | | ||
| 一级目录 | **Home** | | | | ||
| 一级目录 | **Introduction** | | | | ||
| 一级目录 | **Abstractions** | | | | ||
| 二级目录 | 1. Software system | | | | ||
| 二级目录 | 2. Container | | | | ||
| 二级目录 | 3. Component | | | | ||
| 二级目录 | 4. Code | | | | ||
| 二级目录 | Microservices | | | | ||
| 二级目录 | Queues and Topics | | | | ||
| 二级目录 | FAQ | | | | ||
| 一级目录 | **Diagrams** | | | | ||
| 二级目录 | 1. System context diagram | | | | ||
| 二级目录 | 2. Container diagram | | | | ||
| 二级目录 | 3. Component diagram | | | | ||
| 二级目录 | 4. Code diagram | | | | ||
| 二级目录 | System landscape diagram | | | | ||
| 二级目录 | Dynamic diagram | | | | ||
| 二级目录 | Deployment diagram | | | | ||
| 二级目录 | Notation | | | | ||
| 二级目录 | Review checklist | | | | ||
| 二级目录 | Example | | | | ||
| 二级目录 | FAQ | | | | ||
| 一级目录 | **Tooling** | | | | ||
| 一级目录 | **FAQ** | | | | ||
| 一级目录 | **More information** | | | | ||
| 一级目录 | License | | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 开始 | ||
|
||
## 文档引擎 | ||
|
||
目前市面上有众多的文档引擎,C4-model 的官方文档使用 [Jekyll]([欢迎 - Jekyll • 简单静态博客网站生成器](https://jekyllcn.com/docs/home/)) 构建,在国内似乎不如 `Hexo`、`WorldPress` 和 `VuePress` 那么具有影响力(如果你需要一些简单介绍,请参考:[七大热门博客框架对比-CSDN博客](https://blog.csdn.net/weixin_42365530/article/details/107840934)); | ||
|
||
这里我基于汉化效率的考虑,选择了 [VitePress | 由 Vite 和 Vue 驱动的静态站点生成器](https://vitepress.dev/zh/) 作为文档搭建的引擎,并且会将汉化的文档暂时部署在私有域名下,它会从 `Github` 仓库上自动推送到文档网站上以供便捷访问,当然你也可以在本地,或者 `Github` [codespaces](https://docs.github.com/en/codespaces) 中预览,具体请参考 [快速开始](../../guide/quick-start.html)。 | ||
|
||
### 从 Jekyll 迁移到 VitePress | ||
|
||
这一部分主要包括这几个步骤: | ||
|
||
1、删除 `Jekyll` 相关的配置文件,包括 `.github/workflow` 中的自动化部署脚本,保留所有 `.md` 文件 | ||
|
||
2、参照 [快速开始 | VitePress](https://vitepress.dev/zh/guide/getting-started) 进行项目初始化 | ||
|
||
3、编辑 `.vitepress/config.mts`,参照英文原网站构建侧边栏目录 | ||
|
||
4、启动 `VitePress` 用于本地预览以及**检查编译** | ||
|
||
5、逐页面向 `config.mts` 中添加文档并通过(可能出现的)报错信息修改原文档文件,通常,你需要: | ||
|
||
- 注释掉文档开头的 `frontmatter`,因为 `Jekyll` 和 `VitePress` 的 `frontmatter` 不兼容; | ||
- 如果原始文档中有 `script` 标签,请注释整个标签块(包括**引用标签**); | ||
- 一个文件特例:`Diagrams/19-example.md` 文件,不知道为啥一直 `404`,暂且跳过此页面; | ||
|
||
6、。。。 |