python - 在 Sphinx 文档中添加版权信息

标签 python python-sphinx copyright-display

我正在使用 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"

参见 sphinx-doc documentation .

至少对于我使用的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/

相关文章:

python - 使用Flask错误处理程序立即捕获所有Werkzeug异常

android - 如何在 Android 版 map v2 中将版权移至顶部?

server-side - 版权日期需要更新吗?

xcode - 如何更改 Xcode 的整个版权声明模板?

python - 如何从 Django 中的 sql 模式生成数据模型?

python - 值错误 : Invalid RGBA argument: What is causing this error?

python - 有人可以向我解释一些简单的 python 概念吗?

python - 如何用 sphinx 生成函数签名?

python-sphinx - ReStructuredText 中的粗体斜体

python - 使用类型注释记录类属性