pip install sphinx sphinx_rtd_theme sphinx-autobuild
pip install recommonmark sphinx_markdown_tables
sphinx-quickstart
选 y
Project language [en]: zh_CN
conf.py
:
import sys
sys.path.append('..')
extensions = [
'sphinx.ext.autodoc', # for py modules
'recommonmark', # for md
'sphinx_markdown_tables' # for md
]
sys.path.append('..')
将代码所在路径添加进系统路径,相对于conf.py
使用相对路径
sphinx-apidoc -o source/docs 代码所在目录(相对 make.bat 路径)
source/docs
目录下在线浏览 :https://github.com/JieShenAI/blogs/tree/main/sphinx/API
阿里云盘下载: https://www.aliyundrive.com/s/HRgvPfjru81