Wojtek Walczak napisal(a):
>> Is it possible to do something like this for the html output? I don't
>> want "Copyright" to appear at the bottom of the html output. I
>> currently show "Copyright none" as I couldn't figure out how to
>> prevent it from appearing altogether.
>
> It's not possible yet. I will prepare a patch to change this behaviour.
...and here it is, patched against current repository code.
Please, refer to the attachment.
Cheers,
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---
diff -r f057b3aed7d3 doc/config.rst
--- a/doc/config.rst Fri Mar 27 12:07:11 2009 -0500
+++ b/doc/config.rst Fri Mar 27 23:31:53 2009 +0000
@@ -514,6 +514,12 @@
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 -r f057b3aed7d3 sphinx/builders/changes.py
--- a/sphinx/builders/changes.py Fri Mar 27 12:07:11 2009 -0500
+++ b/sphinx/builders/changes.py Fri Mar 27 23:31:53 2009 +0000
@@ -94,6 +94,7 @@
'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 -r f057b3aed7d3 sphinx/builders/html.py
--- a/sphinx/builders/html.py Fri Mar 27 12:07:11 2009 -0500
+++ b/sphinx/builders/html.py Fri Mar 27 23:31:53 2009 +0000
@@ -245,6 +245,7 @@
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 -r f057b3aed7d3 sphinx/config.py
--- a/sphinx/config.py Fri Mar 27 12:07:11 2009 -0500
+++ b/sphinx/config.py Fri Mar 27 23:31:53 2009 +0000
@@ -82,6 +82,7 @@
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 -r f057b3aed7d3 sphinx/quickstart.py
--- a/sphinx/quickstart.py Fri Mar 27 12:07:11 2009 -0500
+++ b/sphinx/quickstart.py Fri Mar 27 23:31:53 2009 +0000
@@ -174,6 +174,12 @@
# 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 -r f057b3aed7d3 sphinx/themes/basic/layout.html
--- a/sphinx/themes/basic/layout.html Fri Mar 27 12:07:11 2009 -0500
+++ b/sphinx/themes/basic/layout.html Fri Mar 27 23:31:53 2009 +0000
@@ -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 %}