Skip to content

Commit

Permalink
Merge pull request #5066 from s-pace/doc/update
Browse files Browse the repository at this point in the history
[doc website] Add a nice search experience
  • Loading branch information
kennethreitz committed Apr 23, 2019
2 parents 7f43841 + 74289f4 commit d22d219
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
21 changes: 21 additions & 0 deletions docs/_templates/sidebarintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
<iframe src="https://ghbtns.com/github-btn.html?user=requests&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<style>
.algolia-autocomplete{
width: 100%;
height: 1.5em
}
.algolia-autocomplete a{
border-bottom: none !important;
}
#doc_search{
width: 100%;
height: 100%;
}
</style>
<input id="doc_search" placeholder="Search the doc" autofocus/>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js" onload="docsearch({
apiKey: 'f177061e2354c50a97bfc635e827ffab',
indexName: 'python-requests',
inputSelector: '#doc_search',
debug: false // Set debug to true if you want to inspect the dropdown
})" async></script>

<p>
Requests is an elegant and simple HTTP library for Python, built for
Expand Down
22 changes: 21 additions & 1 deletion docs/_templates/sidebarlogo.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,27 @@
<iframe src="https://ghbtns.com/github-btn.html?user=requests&repo=requests&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
</p>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<style>
.algolia-autocomplete{
width: 100%;
height: 1.5em
}
.algolia-autocomplete a{
border-bottom: none !important;
}
#doc_search{
width: 100%;
height: 100%;
}
</style>
<input id="doc_search" placeholder="Search the doc" autofocus/>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js" onload="docsearch({
apiKey: 'f177061e2354c50a97bfc635e827ffab',
indexName: 'python-requests',
inputSelector: '#doc_search',
debug: false // Set debug to true if you want to inspect the dropdown
})" async></script>

<p>
Requests is an elegant and simple HTTP library for Python, built for
Expand Down

0 comments on commit d22d219

Please sign in to comment.