Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line copyright notice #4925

Closed
ghost opened this issue May 1, 2018 · 1 comment · Fixed by #10983
Closed

Multi-line copyright notice #4925

ghost opened this issue May 1, 2018 · 1 comment · Fixed by #10983

Comments

@ghost
Copy link

ghost commented May 1, 2018

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!

@tk0miya
Copy link
Member

tk0miya commented May 2, 2018

+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).

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
@AA-Turner AA-Turner modified the milestones: some future version, 7.1.0 May 11, 2023
@AA-Turner AA-Turner linked a pull request May 11, 2023 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants