Sphinx + Github个人笔记
文章目录
准备条件
-
github账号
使用github进行文档版本管理
-
安装Python
有很多博客可以参考,自行百度
Sphinx创建文档
Sphinx是一个基于Python的文档生成项目,开始是用来生成 Python 官方文档的工具,更多介绍可参考官网:https://www.sphinx.org.cn/ 。
- 安装
Sphinx
Github地址为:https://github.com/sphinx-doc/sphinx
当然也可以在命令窗口进行pip
安装:
pip install -U sphinx
- 创建文档
github上新建一个仓库,这个仓库就是托管自己文档的仓库,没有的话就新建一个;然后将其克隆到本地,在项目根目录下创建一个docs
目录,cd进入到该目录,执行命令:
Albert@DESKTOP-P96RPMS MINGW64 /g/Note/docs
$ sphinx-quickstart
Welcome to the Sphinx 4.5.0 quickstart utility.
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).
Selected root path: .
You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: y
The project name will occur in several places in the built documentation.
> Project name: Notes
> Author name(s): albert
> Project release []