mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix OpenSearch description generation.
This commit is contained in:
parent
5caa6d01c5
commit
06b9960719
3
CHANGES
3
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)
|
||||
==========================
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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),
|
||||
|
@ -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'
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user