mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add html_show_copyright config val, patch by Wojtek Walczak.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -1,6 +1,7 @@
|
||||
Release 0.7 (in development)
|
||||
============================
|
||||
|
||||
* Added ``html_show_copyright`` config value.
|
||||
|
||||
Release 0.6.2 (in development)
|
||||
==============================
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'),
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -179,10 +179,12 @@
|
||||
|
||||
{%- block footer %}
|
||||
<div class="footer">
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
|
||||
{%- if show_copyright %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if last_updated %}
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
|
||||
Reference in New Issue
Block a user