6
6
7
7
开始之前请尽量熟悉基本的[ Markdown] ( https://www.markdownguide.org/basic-syntax/ ) 语法并阅读[ 行为守则] ( ../Code-Style/code-of-conduct.md ) 和[ 谷歌开发者文档风格指南] ( https://developers.google.com/style/ ) ,以便您写出更高质量的文档。
8
8
9
-
10
-
11
9
## ** 文档管理逻辑**
10
+
12
11
MatrixOne文档通过三个仓库来协调管理:
13
12
14
13
* [ matrixorigin.io] ( https://github.com/matrixorigin/matrixorigin.io ) 仓库包含文档框架(配置文件)和CI设置
@@ -18,13 +17,16 @@ MatrixOne文档通过三个仓库来协调管理:
18
17
* [ artwork] ( https://github.com/matrixorigin/artwork ) 仓库包含了文档所用到的图像等非结构性文件
19
18
20
19
` matrixorigin.io ` 仓库中有一个子模块` submodule ` ,其引用了` matrixone ` 仓库中的文档内容,当` matrixone ` 仓库的内容更新时,` submodule ` 也会同步更新;而图像等非结构化文件则直接引用` artwork ` 仓库的网站链接,如:
20
+
21
21
```
22
22
https://github.com/matrixorigin/artwork/blob/main/docs/overview/overall-architecture.png?raw=true
23
23
```
24
+
24
25
` matrixorigin.io ` 部署了一个CI程序,当有新的代码被合并时将自动触发,将文档发布到我们的[ 官方文档网站] ( https://docs.matrixorigin.io/ ) 。
25
26
我们的文档是基于 [ mkdocs-material] ( https://github.com/squidfunk/mkdocs-material ) 组件进行开发的,您可以在此链接中了解更多信息。
26
27
27
28
## ** 文档内容架构**
29
+
28
30
MatrixOne文档内容可以分为如下几个模块:
29
31
30
32
* ** Overview** : MatrixOne的简介,包含了项目特点、架构、设计思路和技术细节。
@@ -46,6 +48,7 @@ MatrixOne文档内容可以分为如下几个模块:
46
48
如果您发现了错别字或语法错误,可以点击本页面的` Edit this Page ` 按键直接进行修改。
47
49
48
50
## ** 一般工作流程**
51
+
49
52
当您需要更改文档的具体内容但不涉及章节顺序、架构组织的调整时,只需要对` matrixone ` 进行操作;反之,若您需要调整文档框架,改动` mkdocs.yml ` 文件时,则需要对` matrixorigin.io ` 库进行修改。
50
53
以下流程演示的是对二者均做修改的情况,实际情况可以根据您的需求进行简化。
51
54
@@ -54,24 +57,31 @@ MatrixOne文档内容可以分为如下几个模块:
54
57
** 2.** Fork [ matrixorigin.io] ( https://github.com/matrixorigin/matrixorigin.io ) 和 [ matrixone] ( https://github.com/matrixorigin/matrixone ) 仓库.
55
58
56
59
** 3.** 克隆[ matrixorigin.io] ( https://github.com/matrixorigin/matrixorigin.io ) 仓库,使用` --repository ` 来引用` matrixone ` 中的内容。
60
+
57
61
```
58
62
$ git clone --recursive [email protected] :yourusername/matrixorigin.io.git
59
63
```
64
+
60
65
克隆[ matrixone] ( https://github.com/matrixorigin/matrixorigin.io ) 仓库。
66
+
61
67
```
62
68
$ git clone [email protected] :yourusername/matrixone.git
63
69
```
64
70
65
71
** 4.** 在您的本地matrixone文件夹中将` matrixone ` 仓库添加为远程仓库。
72
+
66
73
```
67
74
git remote add upstream https://github.com/matrixorigin/matrixone.git
68
75
```
76
+
69
77
在您的本地matrixorigin.io文件夹中将` matrixorigin.io ` 仓库添加为远程仓库。
78
+
70
79
```
71
80
git remote add upstream https://github.com/matrixorigin/matrixorigin.io.git
72
81
```
73
82
74
83
** 5.** 本地的matrixorigin.io文件夹中将包含文档所需要的全部文件,因此您可以运行 ` mkdocs serve ` 命令, 然后在` http://localhost:8000 ` 网址中预览文档,检查整个项目文件是否可以正常运行,并且后续也可以检查您所做的修改是否正确。
84
+
75
85
```
76
86
$ mkdocs serve
77
87
```
@@ -81,6 +91,7 @@ $ mkdocs serve
81
91
82
92
** 7.** 确认修改无误后,使用` git add ` 和` git commit ` 命令在本地提交修改,并推送至您Fork的远程仓库` matrixorigin.io ` 与 ` matrixone ` 。
83
93
我们建议您推送至远程仓库的新分支:
94
+
84
95
```
85
96
git push origin main:NEW_BRANCH
86
97
```
@@ -92,18 +103,20 @@ git push origin main:NEW_BRANCH
92
103
** 10.** 最后,还有一些操作可以帮助保持MatrixOne远端仓库,您的远端仓库和本地仓库均保持一致。
93
104
94
105
覆盖本地提交历史:
106
+
95
107
```
96
108
git pull --force upstream main:main
97
109
```
110
+
98
111
更新Github上的` main ` 分支:
112
+
99
113
```
100
114
git push --force origin main:main
101
115
```
102
116
103
117
!!! info 注意
104
118
若您在两个仓库都做了修改,那么以上大部分操作都需要分别针对两个仓库都执行一遍。
105
119
106
-
107
120
## ** 写一篇博文**
108
121
109
122
如果您有意写一篇关于MatrixOne的博文,请在GitHub上提出
[ issue
] ( https://github.com/matrixorigin/matrixone/issues/new/choose ) ,或者将您的想法发送到
[ [email protected] ] ( mailto:[email protected] ) ,无论是简单的idea还是完整的草案,我们统统接受。我们会尽快审查所有内容,如果您的文章或想法很契合我们的博客,我们会直接联系您。
0 commit comments