[Python-checkins] r62670 - in doctools/trunk: CHANGES doc/config.rst doc/markup/misc.rst sphinx/config.py sphinx/quickstart.py sphinx/templates/opensearch.xml
georg.brandl
python-checkins at python.org
Sat May 3 22:15:26 CEST 2008
Author: georg.brandl
Date: Sat May 3 22:15:25 2008
New Revision: 62670
Log:
Fix OpenSearch description generation.
Modified:
doctools/trunk/CHANGES
doctools/trunk/doc/config.rst
doctools/trunk/doc/markup/misc.rst
doctools/trunk/sphinx/config.py
doctools/trunk/sphinx/quickstart.py
doctools/trunk/sphinx/templates/opensearch.xml
Modified: doctools/trunk/CHANGES
==============================================================================
--- doctools/trunk/CHANGES (original)
+++ doctools/trunk/CHANGES Sat May 3 22:15:25 2008
@@ -30,6 +30,9 @@
* Lots of little fixes to the LaTeX output and style.
+* Fix OpenSearch template and make template URL absolute. The
+ `html_use_opensearch` config value now must give the base URL.
+
Release 0.2 (Apr 27, 2008)
==========================
Modified: doctools/trunk/doc/config.rst
==============================================================================
--- doctools/trunk/doc/config.rst (original)
+++ doctools/trunk/doc/config.rst Sat May 3 22:15:25 2008
@@ -255,9 +255,12 @@
.. confval:: html_use_opensearch
- If true, an `OpenSearch <http://opensearch.org>` description file will be
- output, and all pages will contain a ``<link>`` tag referring to it.
- The default is ``False``.
+ If nonempty, an `OpenSearch <http://opensearch.org>` description file will be
+ output, and all pages will contain a ``<link>`` tag referring to it. Since
+ OpenSearch doesn't support relative URLs for its search page location, the
+ value of this option must be the base URL from which these documents are
+ served (without trailing slash), e.g. ``"http://docs.python.org"``. The
+ default is ``''``.
.. confval:: html_translator_class
Modified: doctools/trunk/doc/markup/misc.rst
==============================================================================
--- doctools/trunk/doc/markup/misc.rst (original)
+++ doctools/trunk/doc/markup/misc.rst Sat May 3 22:15:25 2008
@@ -75,4 +75,6 @@
The automatic width is determined by rendering the content in the table, and
scaling them according to their share of the total width.
+ By default, Sphinx uses a table layout with ``L`` for every column.
+
.. versionadded:: 0.2.1
Modified: doctools/trunk/sphinx/config.py
==============================================================================
--- doctools/trunk/sphinx/config.py (original)
+++ doctools/trunk/sphinx/config.py Sat May 3 22:15:25 2008
@@ -57,7 +57,7 @@
html_additional_pages = ({}, False),
html_use_modindex = (True, False),
html_copy_source = (True, False),
- html_use_opensearch = (False, False),
+ html_use_opensearch = ('', False),
# HTML help options
htmlhelp_basename = ('pydoc', False),
Modified: doctools/trunk/sphinx/quickstart.py
==============================================================================
--- doctools/trunk/sphinx/quickstart.py (original)
+++ doctools/trunk/sphinx/quickstart.py Sat May 3 22:15:25 2008
@@ -135,8 +135,9 @@
#html_copy_source = True
# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.
-#html_use_opensearch = False
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
# Output file base name for HTML help builder.
htmlhelp_basename = '%(project)sdoc'
Modified: doctools/trunk/sphinx/templates/opensearch.xml
==============================================================================
--- doctools/trunk/sphinx/templates/opensearch.xml (original)
+++ doctools/trunk/sphinx/templates/opensearch.xml Sat May 3 22:15:25 2008
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{{ project }}</ShortName>
- <LongName>{{ docstitle }}</LongName>
<Description>Search {{ docstitle }}</Description>
<InputEncoding>utf-8</InputEncoding>
- <Url type="text/html" method="get" template="{{ pathto('search') }}?">
- <Param name="q" value="{searchTerms}" />
- <Param name="check_keywords" value="yes" />
- <Param name="area" value="default" />
- </Url>
+ <Url type="text/html" method="get"
+ template="{{ use_opensearch }}/{{ pathto('search') }}?q={searchTerms}&check_keywords=yes&area=default"/>
+ <LongName>{{ docstitle }}</LongName>
{% block extra %}{# Put e.g. an <Image> element here. #}{% endblock %}
</OpenSearchDescription>
More information about the Python-checkins
mailing list