]> granicus.if.org Git - python/commitdiff
Add OpenSearch and a Python logo to the HTML output.
authorGeorg Brandl <georg@python.org>
Sun, 27 Apr 2008 20:03:05 +0000 (20:03 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 27 Apr 2008 20:03:05 +0000 (20:03 +0000)
Doc/conf.py
Doc/tools/sphinxext/layout.html [new file with mode: 0644]
Doc/tools/sphinxext/opensearch.xml [new file with mode: 0644]
Doc/tools/sphinxext/static/py.png [new file with mode: 0644]

index 45d40fbd43553dbf527e0d589709a23925320a25..e4641ea1bb4bd9ac7d8225a82a6963c140cfd8e5 100644 (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('.', '')
 
diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html
new file mode 100644 (file)
index 0000000..689cbda
--- /dev/null
@@ -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 (file)
index 0000000..d672c2e
--- /dev/null
@@ -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 (file)
index 0000000..93e4a02
Binary files /dev/null and b/Doc/tools/sphinxext/static/py.png differ