Skip to content

iHealth-ecnu/iHealth_doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iHealth_doc

iHealth 项目的文档(used by sphinx)

使用方法

  1. 安装 Sphinx
pip install sphinx
  1. 创建文档目录
mkdir xxx_doc
cd xxx_doc
  1. 使用 Sphinx 初始化该目录
sphinx-quickstart

初始化过程有一些选项,一般默认就可以,选项都是什么意思可以参考:

文档整体解决方案(readthedocs、github 、sphinx)使用

目录创建好之后,结构如下:

readthedocs
│ make.bat
│ Makefile
├─build
└─source
  │ conf.py
  │ index.rst
  ├─_static
  └─_templates
  1. 添加 .gitignore 文件

因为 build 目录存放的是构建好的 html 页面等,我们不提交它们,在 .gitignore 中添加如下信息过滤掉。

build
*.pyc
  1. 项目提交到 github
git init
git remote add origin git@github.com:xxx/xxx_doc.git
git add .
git commit -m 'first commit'
git push origin master
  1. 在 read the docs 中连接 github 托管该项目

其它:

  1. 更改默认主题

修改 conf.py

html_theme = 'sphinx_rtd_theme'

参考资料