ITPub博客

首页 > 数据库 > > 使用Sphinx生成项目的Read the Docs

使用Sphinx生成项目的Read the Docs

作者:u_9ff4c058a0e0 时间:2022-03-21 11:38:00 0 删除 编辑
  1. 环境配置
# pip install sphinx sphinx_rtd_theme
  1. 原始代码目录
# tree
文件夹 PATH 列表
卷序列号为 0007-1DAC
D:.
├─web
      └─web_gzip.py
  1. 创建api文档
# 在代码目录中创建doc目录,存放相应的信息
# sphinx-apidoc -o ./doc/ . 
Creating file ./doc/web_gzip.rst.
Creating file ./doc/modules.rst.
  1. 运行sphinx-quictstart ```

sphinx-quickstart





  1. 修改conf.py 在最开始处加入rtd theme相关配置



同时要注释原来的theme设置



  1. 修改index.rst



  1. 执行make.bat html



  1. 查看






来源 https://zhuanlan.zhihu.com/p/67068696

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69999831/viewspace-3135760/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2022-02-11

  • 博文量
    1828
  • 访问量
    20600