Commits

Anonymous committed 3b37a79

Fix OpenSearch description generation.

Comments (0)

Files changed (6)

 
 * 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)
 ==========================
 
 .. 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
 

doc/markup/misc.rst

    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
         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),

sphinx/quickstart.py

 #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'

sphinx/templates/opensearch.xml

 <?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>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.