python-sphinxdocumentation-generationweb-publishing

How to include publishing notes in Sphinx documentation?


I would like to include a link to our publishing notes in the footer of Spinx html outout, next to the Copyright notice.

enter image description here

=> What is the recommended way to include publishing notes in the (html output of) Sphinx documentation?

=> Or asked in a more general way: how can I adapt the html footer that contains the copyright notice (and that is shown below each content page)?

Edit:

I also tried

html_theme_options = {
    'footer': '<a href="https://www.foo.de/en/publishing-notes.html">PUBLISHING NOTES</a>'
}

without luck.

Related:

https://github.com/readthedocs/sphinx_rtd_theme/issues/1490


Solution

  • a) With sphinx_rtd_theme

    enter image description here

    Also see https://github.com/readthedocs/sphinx_rtd_theme/issues/349

    b) Without sphinx_rtd_theme

    See following related SO question on how to override the default layout:

    How can I add a custom footer to Sphinx documentation?

    _templates/layout.html:

    {% extends '!layout.html' %}
    
    {% block footer %}
            <!-- your html code here -->
    {% endblock %}
    

    That layout will probably not be applied if you specify an explicit theme. With an explicit theme use some theme specific options like shown in a)