Skip to content

Multi-line copyright notice #4925

Closed

Description

Problem

  • Sphinx cannot generate multi-line copyright notice in the HTML output

How to reproduce

Assuming we want to display:
©️ Copyright 2017, A
©️ Copyright 2018, B

It seems impossible to display these lines under each other. The best behavior can be achieved using:

copyright = u'2017, A, \xA9 Copyright 2018, B'

which outputs: ©️ Copyright 2017, A, ©️ Copyright 2018, B
but this is hacky and still renders in the same line!

Expected behaviour

Either to allow copyright variable being a list:

copyright = [u'2017, A', u'2018, B']

which should generate the two lines properly

Or at least to allow HTML embedding:

copyright = u'2017, A<br />&copy; Copyright 2018, B'

which still hacky anyway!

Activity

  1. tk0miya commented on May 2, 2018

    @tk0miya
    Member

    +0: I can accept if anybody send a PR for this to us.

    As a workaround, you can customize the footer manually. Please put a following file onto your project as named _templates/layout.html:

    {%- block footer %}
        <div class="footer" role="contentinfo">
        &#169; Copyright Copyright 2017, A.<br />
        &#169; Copyright Copyright 2018, B.
        {%- if last_updated %}
          {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
        {%- endif %}
        {%- if show_sphinx %}
          {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
        {%- endif %}
        </div>
    {%- endblock %}
    

    (I just used <br /> to fold the line after first copyright. But you can use other tags as you like).

  2. added this to the some future version milestone on Sep 29, 2022
  3. locked as resolved and limited conversation to collaborators on Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions