为Github项目建立文档

有两种编写方式:html

  • In reStructuredText
  • In Markdown

In reStructuredText git

工具:  pip install sphinx sphinx-autobuild  github

克隆你的仓库到本地:  git clone https://github.com/yourusername/yourrepository.git 工具

在仓库根目录内建立文档:ui

mkdir docs  & cd docs

sphinx-quickstart //按照提示一路下去,会生成index.rst和conf.py,以及一些其余的目录和文件

编辑index.rst文件spa

  Contents:code

  Indices and tableshtm

  等blog

编译html文件  make html ip

 

将本地仓库上传到github  git push //输入帐号密码 


 

注册并登陆Read the Docs

  设置 - Connected to Github   //关联Github帐号

 

开始导入文档

  Import a Project  //会自动列出Github上的仓库名,没有的话也能够手动导入

  按照提示,就能够成功建立了

相关文章
相关标签/搜索