summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeorg.brandl <devnull@localhost>2008-05-03 20:15:25 +0000
committergeorg.brandl <devnull@localhost>2008-05-03 20:15:25 +0000
commit00c794b37a472bf0bb66914329264a6a889cbed0 (patch)
tree7194cec8adf175ad503371c3bea6f065f2f11dbe
parentf20dd9ee70bdadffba729c925d4c7d99468fcda7 (diff)
downloadsphinx-00c794b37a472bf0bb66914329264a6a889cbed0.tar.gz
Fix OpenSearch description generation.
-rw-r--r--CHANGES3
-rw-r--r--doc/config.rst9
-rw-r--r--doc/markup/misc.rst2
-rw-r--r--sphinx/config.py2
-rw-r--r--sphinx/quickstart.py5
-rw-r--r--sphinx/templates/opensearch.xml9
6 files changed, 18 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index 9e5fb573..f9135dbe 100644
--- a/CHANGES
+++ b/CHANGES
@@ -30,6 +30,9 @@ Bugs fixed
* 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)
==========================
diff --git a/doc/config.rst b/doc/config.rst
index 6f8ea62b..3f69c480 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -255,9 +255,12 @@ that use Sphinx' HTMLWriter class.
.. 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
diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst
index 62ee6b67..a2135a5d 100644
--- a/doc/markup/misc.rst
+++ b/doc/markup/misc.rst
@@ -75,4 +75,6 @@ exists:
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
diff --git a/sphinx/config.py b/sphinx/config.py
index 3e64ee2a..656df2cb 100644
--- a/sphinx/config.py
+++ b/sphinx/config.py
@@ -57,7 +57,7 @@ class Config(object):
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),
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index f26a3392..5d3eb6e3 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -135,8 +135,9 @@ html_last_updated_fmt = '%%b %%d, %%Y'
#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'
diff --git a/sphinx/templates/opensearch.xml b/sphinx/templates/opensearch.xml
index 1f14e9bd..4e1fec03 100644
--- a/sphinx/templates/opensearch.xml
+++ b/sphinx/templates/opensearch.xml
@@ -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}&amp;check_keywords=yes&amp;area=default"/>
+ <LongName>{{ docstitle }}</LongName>
{% block extra %}{# Put e.g. an <Image> element here. #}{% endblock %}
</OpenSearchDescription>