summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-04-27 20:03:05 (GMT)
committerGeorg Brandl <georg@python.org>2008-04-27 20:03:05 (GMT)
commit4f1f36bcabe098394934ac7cac84c1f26fff2c86 (patch)
tree079df1e49a5f7baea6ab5d656998cea6d05f9a21 /Doc
parentf19a7b90bd0cbdf40d02f125db3e39f077f3a89f (diff)
downloadcpython-4f1f36bcabe098394934ac7cac84c1f26fff2c86.zip
cpython-4f1f36bcabe098394934ac7cac84c1f26fff2c86.tar.gz
cpython-4f1f36bcabe098394934ac7cac84c1f26fff2c86.tar.bz2
Add OpenSearch and a Python logo to the HTML output.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/conf.py6
-rw-r--r--Doc/tools/sphinxext/layout.html5
-rw-r--r--Doc/tools/sphinxext/opensearch.xml14
-rw-r--r--Doc/tools/sphinxext/static/py.pngbin0 -> 695 bytes
4 files changed, 25 insertions, 0 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index 45d40fb..e4641ea 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -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('.', '')
diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html
new file mode 100644
index 0000000..689cbda
--- /dev/null
+++ b/Doc/tools/sphinxext/layout.html
@@ -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 %}
diff --git a/Doc/tools/sphinxext/opensearch.xml b/Doc/tools/sphinxext/opensearch.xml
new file mode 100644
index 0000000..d672c2e
--- /dev/null
+++ b/Doc/tools/sphinxext/opensearch.xml
@@ -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>
+
diff --git a/Doc/tools/sphinxext/static/py.png b/Doc/tools/sphinxext/static/py.png
new file mode 100644
index 0000000..93e4a02
--- /dev/null
+++ b/Doc/tools/sphinxext/static/py.png
Binary files differ