Add html_show_copyright config val, patch by Wojtek Walczak.

This commit is contained in:
Georg Brandl
2009-04-09 19:04:44 +00:00
parent 332f71c0c3
commit b349660d95
7 changed files with 22 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
Release 0.7 (in development)
============================
* Added ``html_show_copyright`` config value.
Release 0.6.2 (in development)
==============================

View File

@@ -514,6 +514,12 @@ that use Sphinx' HTMLWriter class.
to translate document trees to HTML. Default is ``None`` (use the builtin
translator).
.. confval:: html_show_copyright
If true, "(C) Copyright ..." is shown in the HTML footer. Default is ``True``.
.. versionadded:: 0.7
.. confval:: html_show_sphinx
If true, "Created using Sphinx" is shown in the HTML footer. Default is

View File

@@ -94,6 +94,7 @@ class ChangesBuilder(Builder):
'libchanges': sorted(libchanges.iteritems()),
'apichanges': sorted(apichanges),
'otherchanges': sorted(otherchanges.iteritems()),
'show_copyright': self.config.html_show_copyright,
'show_sphinx': self.config.html_show_sphinx,
}
f = codecs.open(path.join(self.outdir, 'index.html'), 'w', 'utf8')

View File

@@ -245,6 +245,7 @@ class StandaloneHTMLBuilder(Builder):
use_opensearch = self.config.html_use_opensearch,
docstitle = self.config.html_title,
shorttitle = self.config.html_short_title,
show_copyright = self.config.html_show_copyright,
show_sphinx = self.config.html_show_sphinx,
has_source = self.config.html_copy_source,
show_source = self.config.html_show_sourcelink,

View File

@@ -82,6 +82,7 @@ class Config(object):
html_use_opensearch = ('', 'html'),
html_file_suffix = (None, 'html'),
html_link_suffix = (None, 'html'),
html_show_copyright = (True, 'html'),
html_show_sphinx = (True, 'html'),
html_context = ({}, 'html'),

View File

@@ -174,6 +174,12 @@ html_static_path = ['%(dot)sstatic']
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.

View File

@@ -179,10 +179,12 @@
{%- block footer %}
<div class="footer">
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}