style(docs): standardize heading formats and numbering

- Enforce Level 1-3 structural numbering based on SUMMARY.md hierarchy
- Remove structural numbering from Level 4+ headings
- Eliminate single child headings by converting to bold text
- Auto-inject summary text for headings with multiple children missing intro text
- Exclude Appendix chapters from structural numbering
- Avoid modifying code block contents
- Add script to detect non-standard English usage in headers
This commit is contained in:
Baohua Yang
2026-02-21 22:40:33 -08:00
parent 33af380be1
commit 175aaae48a
136 changed files with 1015 additions and 766 deletions

View File

@@ -23,10 +23,10 @@ jobs:
args: go version
```
## 概述
## 19.9 概述
总体概述了以下内容
## 参考资料
## 19.9 参考资料
* [Actions Docs](https://docs.github.com/en/actions)

View File

@@ -1,8 +1,8 @@
## DevOps 工作流完整示例
## 19.8 DevOps 工作流完整示例
本章将演示一个基于 DockerKubernetes Jenkins/GitLab CI 的完整 DevOps 工作流
### 工作流概览
### 19.8.1 工作流概览
1. **Code**开发人员提交代码到 GitLab
2. **Build**GitLab CI 触发构建任务
@@ -12,7 +12,7 @@
6. **Verify**人工或自动化验证
7. **Release (Production)**审批后自动部署到生产环境
### 关键配置示例
### 19.8.2 关键配置示例
本节涵盖了相关内容与详细描述主要探讨以下几个方面
@@ -79,7 +79,7 @@ deploy_staging:
- develop
```
### 最佳实践
### 19.8.3 最佳实践
1. **不可变基础设施**一旦镜像构建完成在各个环境 (DevStagingProd) 中都应该使用同一个镜像 tag (通常是 commit hash)而不是重新构建
2. **配置分离**使用 ConfigMap Secret 管理环境特定的配置不要打包进镜像

View File

@@ -6,13 +6,13 @@
本小节以 `GitHub` + `Drone` 来演示 `Drone` 的工作流程当然在实际开发过程中你的代码也许不在 GitHub 托管那么你可以尝试使用 `Gogs` + `Drone` 来进行 `CI/CD`
## Drone 关联项目
## 19.10 Drone 关联项目
Github 新建一个名为 `drone-demo` 的仓库
打开我们已经[部署好的 Drone 网站](install.md)或者 [Drone Cloud](https://cloud.drone.io),使用 GitHub 账号登录,在界面中关联刚刚新建的 `drone-demo` 仓库。
## 编写项目源代码
## 19.10 编写项目源代码
初始化一个 git 仓库
@@ -72,7 +72,7 @@ trigger:
└── app.go
```
## 推送项目源代码到 GitHub
## 19.10 推送项目源代码到 GitHub
运行以下命令
@@ -84,7 +84,7 @@ $ git commit -m "test drone ci"
$ git push origin master
```
## 查看项目构建过程及结果
## 19.10 查看项目构建过程及结果
打开我们部署好的 `Drone` 网站或者 Drone Cloud即可看到构建结果
@@ -94,7 +94,7 @@ $ git push origin master
本书 GitBook 也使用 Drone 进行 CI/CD具体配置信息请查看本书根目录 [`.drone.yml`](https://github.com/yeasy/docker_practice/blob/master/.drone.yml) 文件。
## 参考链接
## 19.10 参考链接
* [Drone Github](https://github.com/drone/drone)
* [Drone 文档](https://docs.drone.io/)

View File

@@ -2,13 +2,13 @@
这是一个基于 Go 语言编写的简单 Web 应用示例用于演示 Drone CI 的持续集成流程
## 目录结构
## 19.12 目录结构
* `app.go`简单的 Go Web 服务器代码
* `.drone.yml`Drone CI 的配置文件定义了构建和测试流程
* `Dockerfile`定义了如何将该应用构建为 Docker 镜像
## 如何运行
## 19.12 如何运行
1. 确保本地已安装 Docker 环境
2. 进入本目录构建镜像

View File

@@ -1,8 +1,8 @@
## 部署 Drone
## 19.11 部署 Drone
本节涵盖了相关内容与详细描述主要探讨以下几个方面
### 要求
### 19.11.1 要求
* 拥有公网 IP域名 (如果你不满足要求可以尝试在本地使用 Gogs + Drone)
@@ -14,7 +14,7 @@
* `CI/CD` 有一定了解
### 新建 GitHub 应用
### 19.11.2 新建 GitHub 应用
登录 GitHub https://github.com/settings/applications/new 新建一个应用。
@@ -22,7 +22,7 @@
接下来查看这个应用的详情记录 `Client ID` `Client Secret`之后配置 Drone 会用到
### 配置 Drone
### 19.11.3 配置 Drone
我们通过使用 `Docker Compose` 来启动 `Drone`编写 `compose.yaml` ( `docker-compose.yml`) 文件