Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add copyright information to Sphinx documentation

I'm using Sphinx to document a Python module.

I have a module that has author and copyright defined.

__author__ = "John Doe <[email protected]>"
__copyright__ = "Copyright 2015-2016 Dummy Corp All Rights Reserved."

I tried adding the :special-members: tag to the automodule directive.

.. automodule:: PyFabric
   :special-members: 

This documents the author, but copyright isn't picked up. Is there anyway to get Sphinx to recognize and add the copyright?

like image 361
BretD Avatar asked Sep 10 '25 16:09

BretD


1 Answers

In your conf.py, set copyright = "© 2042 The Ravenous Bugblatter Beast of Traal".

See sphinx-doc documentation.

At least for the html_theme = "sphinx_rtd_theme" that I use, this will add the copyright notice in the footer of every HTML page.

This does not add the copyright notice to latex (and PDF) generated documentation; there is a open feature request at the time of writing. I have asked how this might be done nevertheless, see How to add copyright notice to sphinx-generated latex documentation?.

like image 58
gerrit Avatar answered Sep 13 '25 07:09

gerrit