操作
准备环境
- 安装python(link)注意安装的时候选择pip
- 安装Sphinx,两种方法link
2.1 直接使用命令行(Ctrl+R)
2.2 或者用git下载再安装pip install -U sphinx
pip install git+https://github.com/sphinx-doc/sphinx
搭建工程
-
进入某个目录底下执行命令行,第二个选择我空格了,填完项目名和作者,直接回车
sphinx-quickstart
1.1 选择md格式,默认是rst文件(更新:还是使用rst就好,md和rst可以共用,见文档)
-
查看文档
2.1 执行下面命令,然后项目目录下build->html->打开index.htmlmake clean make html
视频
下一节,布置主题以及把页面发布到网上
使用Sphinx搭建本地(window)文档并把它部署到网上(github)-布置主题并发布(2)
使用Sphinx搭建本地(window)文档并把它部署到网上(github)-使用live server本地查看修改(3)
参考链接
[1]http://www.sphinx-doc.org/en/master/index.html
[2]https://www.python.org/downloads/
[3]https://blog.csdn.net/enjoyyl/article/details/97820201