操作
準備環境
- 安裝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