Skip to content

DOCS372 implement opensearch #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 24, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions themes/docs.mongodb.org/osd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>MongoDB Help</ShortName>
<LongName>Google Custom Search of MongoDB documentation and wiki</LongName>
<Description>Google Custom Search of MongoDB documentation (docs.mongodb.org) and wiki (www.mongodb.org/display/DOCS)</Description>
<Tags>mongodb mongo mongodocs</Tags>
<Query role="example" searchTerms="mongodb"/>
<Image height="16" width="16" type="image/vnd.microsoft.icon">http://media.mongodb.org/favicon.ico</Image>
<Developer>10gen, inc.</Developer>
<Contact>[email protected]</Contact>
<Url type="text/html" rel="results" template="http://www.google.com/cse?cx=017213726194841070573:WMX6838984&amp;ie=UTF-8&amp;q={searchTerms}" />
<Url type="application/opensearchdescription+xml" rel="self" template="http://docs.mongodb.org/osd.xml"/>
<Attribution>Google Custom Search by 10Gen.com</Attribution>
</OpenSearchDescription>
9 changes: 4 additions & 5 deletions themes/mongodb/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,10 @@
{{ css() }}
{%- if not embedded %}
{{ script() }}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- block googlecse_opensearch %}
{#- can't use Sphinx builtin opensearch, but can point to our own #}
<link rel="search" type="application/opensearchdescription+xml" href="http://docs.mongodb.org/osd.xml" title="MongoDB Help"/>
{%- endblock -%}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
Expand Down