Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e757005

Browse files
committed
Merge OpenSearch-related changes.
1 parent 40360f2 commit e757005

4 files changed

Lines changed: 25 additions & 0 deletions

File tree

Doc/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
'index': 'indexcontent.html',
8787
}
8888

89+
# Output an OpenSearch description file.
90+
html_use_opensearch = 'http://docs.python.org/dev/3.0'
91+
92+
# Additional static files.
93+
html_static_path = ['tools/sphinxext/static']
94+
8995
# Output file base name for HTML help builder.
9096
htmlhelp_basename = 'python' + release.replace('.', '')
9197

Doc/tools/sphinxext/layout.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends "!layout.html" %}
2+
{% block rootrellink %}
3+
<li><img src="{{ pathto('_static/py.png', 1) }}" alt="" style="vertical-align: middle; margin-top: -1px"/></li>
4+
{{ super() }}
5+
{% endblock %}

Doc/tools/sphinxext/opensearch.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
3+
<ShortName>Python Docs</ShortName>
4+
<LongName>Python Documentation</LongName>
5+
<Description>Search the Python documentation</Description>
6+
<InputEncoding>utf-8</InputEncoding>
7+
<Url type="text/html" method="get" template="{{ pathto('search') }}?">
8+
<Param name="q" value="{searchTerms}" />
9+
<Param name="check_keywords" value="yes" />
10+
<Param name="area" value="default" />
11+
</Url>
12+
<Image height="16" width="16" type="image/x-icon">http://www.python.org/images/favicon16x16.ico</Image>
13+
</OpenSearchDescription>
14+

Doc/tools/sphinxext/static/py.png

695 Bytes
Loading

0 commit comments

Comments
 (0)