2022-01-04 05:51:41 +00:00
|
|
|
|
# 环境配置
|
|
|
|
|
## 环境依赖安装
|
2022-01-04 03:58:10 +00:00
|
|
|
|
```bash
|
|
|
|
|
#视情况使用pip/pip3
|
2022-10-18 02:01:45 +00:00
|
|
|
|
pip3 install sphinx
|
|
|
|
|
pip3 install recommonmark
|
|
|
|
|
pip3 install sphinx_rtd_theme
|
|
|
|
|
pip3 install sphinx_markdown_tables
|
|
|
|
|
pip3 install sphinx-multiversion
|
2022-01-04 03:58:10 +00:00
|
|
|
|
```
|
2022-01-04 05:26:25 +00:00
|
|
|
|
|
|
|
|
|
# 更新版本
|
|
|
|
|
```
|
|
|
|
|
git tag -a v${version} -m "message"
|
|
|
|
|
```
|
2022-01-04 05:56:06 +00:00
|
|
|
|
|
|
|
|
|
# 创建多版本
|
|
|
|
|
```
|
|
|
|
|
sphinx-multiversion source build/html
|
|
|
|
|
```
|
|
|
|
|
|
2022-01-04 05:51:41 +00:00
|
|
|
|
# 将TAG推送到服务端
|
|
|
|
|
```
|
|
|
|
|
git push --tags
|
|
|
|
|
```
|
2021-09-24 17:43:11 +00:00
|
|
|
|
# 配置文件说明
|
|
|
|
|
./source/index.rst
|
|
|
|
|
./source/conf.py
|
|
|
|
|
# 编写文档
|
2022-01-04 05:51:41 +00:00
|
|
|
|
前往markdown/markdown_BDWare目录,修改xxx.md文件。
|
2021-09-24 17:43:11 +00:00
|
|
|
|
|
|
|
|
|
## 转换成rst,并生成html。
|
|
|
|
|
|
2022-01-04 03:58:10 +00:00
|
|
|
|
执行:
|
2021-09-24 17:43:11 +00:00
|
|
|
|
```bash
|
|
|
|
|
sh toRst.sh
|
|
|
|
|
```
|
|
|
|
|
|
2022-01-04 03:58:10 +00:00
|
|
|
|
## 生成pdf文件
|
|
|
|
|
|
|
|
|
|
执行:
|
|
|
|
|
```bash
|
|
|
|
|
make latex
|
|
|
|
|
make latexPdf
|
|
|
|
|
```
|
2021-09-24 17:43:11 +00:00
|
|
|
|
# MarkDownTips
|
|
|
|
|
|
2022-04-29 14:29:46 +00:00
|
|
|
|
1. 学习markdown:https://www.runoob.com/markdown/md-tutorial.html
|
|
|
|
|
2. 可参考现有.md文件作为模板。
|
|
|
|
|
3. 表格示例:
|
|
|
|
|
|
2021-09-24 17:43:11 +00:00
|
|
|
|
| 字段 | 值 |
|
|
|
|
|
| ------ | --------------------------------- |
|
|
|
|
|
| action | startContract |
|
|
|
|
|
| script | 合约脚本内容, 需进行进行URIEncode |
|
|
|
|
|
|
2022-04-29 14:29:46 +00:00
|
|
|
|
4. 代码示例:
|
2021-09-24 17:43:11 +00:00
|
|
|
|
特别地,json代码的格式化可以使用:http://www.bejson.com/t2ck.htm
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"data": "{\"status\":\"Success\",\"result\":\"\"}",
|
|
|
|
|
"action": "onStartContract",
|
|
|
|
|
"cid": "-562752842",
|
|
|
|
|
"executeTime": 1187
|
|
|
|
|
}
|
|
|
|
|
```
|
2022-04-29 14:29:46 +00:00
|
|
|
|
5. 插入图片示例:
|
|
|
|
|
|
2021-09-24 17:43:11 +00:00
|
|
|
|
![shortcut2](./_static/imgs/shortcut2.png)
|
2022-04-29 14:29:46 +00:00
|
|
|
|
|
2021-09-24 17:43:11 +00:00
|
|
|
|
方括号内为小标题,小括号内为“图片的相对路径”,一定不要写成绝对路径。
|
|
|
|
|
|
2022-04-29 14:29:46 +00:00
|
|
|
|
6. 超链接:
|
2021-09-24 17:43:11 +00:00
|
|
|
|
[百度](http://baidu.com)
|