Add OpenSearch and a Python logo to the HTML output.

This commit is contained in:
Georg Brandl 2008-04-27 20:03:05 +00:00
parent f19a7b90bd
commit 4f1f36bcab
4 changed files with 25 additions and 0 deletions

View File

@ -85,6 +85,12 @@ html_additional_pages = {
'index': 'indexcontent.html',
}
# Output an OpenSearch description file.
html_use_opensearch = True
# Additional static files.
html_static_path = ['tools/sphinxext/static']
# Output file base name for HTML help builder.
htmlhelp_basename = 'python' + release.replace('.', '')

View File

@ -0,0 +1,5 @@
{% extends "!layout.html" %}
{% block rootrellink %}
<li><img src="{{ pathto('_static/py.png', 1) }}" alt="" style="vertical-align: middle; margin-top: -1px"/></li>
{{ super() }}
{% endblock %}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Python Docs</ShortName>
<LongName>Python Documentation</LongName>
<Description>Search the Python documentation</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>
<Image height="16" width="16" type="image/x-icon">http://www.python.org/images/favicon16x16.ico</Image>
</OpenSearchDescription>

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B