我正在使用 Sphinx 来记录 Python 模块。
我有一个定义了作者和版权的模块。
__author__ = "John Doe <johndoe@example.com>"
__copyright__ = "Copyright 2015-2016 Dummy Corp All Rights Reserved."
我尝试将 :special-members: 标签添加到自动模块指令中。
.. automodule:: PyFabric
:special-members:
这记录了作者,但没有获得版权。有没有办法让Sphinx承认并添加版权?
最佳答案
在您的 conf.py
中,设置 copyright = "© 2042 The Ravenous Bugblatter Beast of Traal"
。
至少对于我使用的html_theme = "sphinx_rtd_theme"
,这将在每个 HTML 页面的页脚中添加版权声明。
这不会将版权声明添加到 latex (和 PDF)生成的文档中;有一个open feature request在撰写本文时。尽管如此,我已经问过如何做到这一点,请参阅 How to add copyright notice to sphinx-generated latex documentation? .
关于python - 在 Sphinx 文档中添加版权信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36505182/