start
运行sphinx-quickstart,会提示输入一些基本配置,更深入的配置,可通过修改conf.py实现。
conf.py
- sys.path.insert(0, os.path.abspath('../../'))用于设置源码路径
- 添加automodule,这里指定的smartlock.py是需要在源码路径下(即可以import smartlock)
.. automodule:: smartlock
   :members:
- 在extensions添加autodoc,自动提取docstring
- 设置主题html_theme = 'sphinxdoc'
- 安装m2r,可以在rst中嵌入markdown文档
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 [ yehuohan@gmail.com ]