mirror of
https://gitee.com/BDWare/bdcontract-doc
synced 2025-01-10 09:54:17 +00:00
62 lines
1.3 KiB
Markdown
62 lines
1.3 KiB
Markdown
# 环境依赖安装:
|
||
```bash
|
||
#视情况使用pip/pip3
|
||
pip install sphinx
|
||
pip install recommonmark
|
||
pip install sphinx_rtd_theme
|
||
pip install sphinx_markdown_tables
|
||
pip install sphinx-multiversion
|
||
```
|
||
# 配置文件说明
|
||
|
||
./source/index.rst
|
||
./source/conf.py
|
||
|
||
# 编写文档
|
||
|
||
前往source/markdown目录,修改xxx.md文件。
|
||
|
||
## 转换成rst,并生成html。
|
||
|
||
执行:
|
||
```bash
|
||
sh toRst.sh
|
||
```
|
||
|
||
## 生成pdf文件
|
||
|
||
执行:
|
||
```bash
|
||
make latex
|
||
make latexPdf
|
||
```
|
||
##
|
||
|
||
|
||
# MarkDownTips
|
||
|
||
1)学习markdown:https://www.runoob.com/markdown/md-tutorial.html
|
||
2)可参考现有.md文件作为模板。
|
||
3)表格示例:
|
||
| 字段 | 值 |
|
||
| ------ | --------------------------------- |
|
||
| action | startContract |
|
||
| script | 合约脚本内容, 需进行进行URIEncode |
|
||
|
||
4)代码示例:
|
||
特别地,json代码的格式化可以使用:http://www.bejson.com/t2ck.htm
|
||
```json
|
||
{
|
||
"data": "{\"status\":\"Success\",\"result\":\"\"}",
|
||
"action": "onStartContract",
|
||
"cid": "-562752842",
|
||
"executeTime": 1187
|
||
}
|
||
```
|
||
5)插入图片示例:
|
||
![shortcut2](./_static/imgs/shortcut2.png)
|
||
方括号内为小标题,小括号内为“图片的相对路径”,一定不要写成绝对路径。
|
||
|
||
6)超链接:
|
||
[百度](http://baidu.com)
|