可以将markdown生成为html文件 gitbook serve
GitBook是基于nodejs的,下载gitbook需要先下载nodejs
Nodejs下载
下载gitbook
npm install -g gitbook-cli --registry=https://registry.npm.taobao.org
npm install -g gitbook --registry=https://registry.npm.taobao.org
gitbook -v 测试是否安装成功
成功后 运行 gitbook init 生成书籍目录(SUMMARY.md)和说明文件(README.md)
注意:书籍目录需要自己手动更新,格式为
* [Introduction](README.md)
* [第一部分](chapter1/README.md) * [名称](存放.md文件的文件夹/README.md) 相对路径
* [1.1 数学](chapter1/math/math.md) * [名称](md文件的相对路径)
* [1.1 高等数学](chapter1/math/advance.md)
* [1.2 编程语言](chapter1/program/program.md)
* [第二部分](chapter2/README.md)
* [2.1 算法](chapter2/algorithm/algorithm.md)
编辑完成后,需要再次执行 gitbook init
然后执行 gitbook serve 启动书籍,即可访问