summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-09 19:04:44 +0000
committerGeorg Brandl <georg@python.org>2009-04-09 19:04:44 +0000
commitb349660d955e7c2aeb8eda4db35d93ff667e4a4c (patch)
treecebaa5e525b9ce7ec7180fec2a7e11f15dccfb11
parent332f71c0c3da7e813513237f300c81ddeae5b60e (diff)
downloadsphinx-git-b349660d955e7c2aeb8eda4db35d93ff667e4a4c.tar.gz
Add html_show_copyright config val, patch by Wojtek Walczak.
-rw-r--r--CHANGES1
-rw-r--r--doc/config.rst6
-rw-r--r--sphinx/builders/changes.py1
-rw-r--r--sphinx/builders/html.py1
-rw-r--r--sphinx/config.py1
-rw-r--r--sphinx/quickstart.py6
-rw-r--r--sphinx/themes/basic/layout.html10
7 files changed, 22 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index c0be798e8..adf948555 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
Release 0.7 (in development)
============================
+* Added ``html_show_copyright`` config value.
Release 0.6.2 (in development)
==============================
diff --git a/doc/config.rst b/doc/config.rst
index 276f97d3a..54fb7c7f3 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -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
diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py
index e07b06d88..ad0b8d195 100644
--- a/sphinx/builders/changes.py
+++ b/sphinx/builders/changes.py
@@ -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')
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 365cf5f96..32dd2f24f 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -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,
diff --git a/sphinx/config.py b/sphinx/config.py
index 3e3abb0db..3cedfd64d 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -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'),
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index e5b7cfaf5..0e6b3032e 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -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.
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html
index dd2e2d511..5aaaeff28 100644
--- a/sphinx/themes/basic/layout.html
+++ b/sphinx/themes/basic/layout.html
@@ -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 %}