8000 feat: add search to every documentation pages · angellmethod/python-guide@f43eff5 · GitHub
[go: up one dir, main page]

Skip to content

Commit f43eff5

Browse files
author
s-pace
committed
feat: add search to every documentation pages
1 parent b08cf0c commit f43eff5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/_templates/sidebarlogo.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@
66

77
<p style="margin-left:auto; margin-right: auto;"><iframe src="https://ghbtns.com/github-btn.html?user=realpython&repo=python-guide&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe></p>
88

9+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
10+
<style>
11+
.algolia-autocomplete{
12+
width: 100%;
13+
height: 1.5em
14+
}
15+
.algolia-autocomplete a{
16+
border-bottom: none !important;
17+
}
18+
#doc_search{
19+
width: 100%;
20+
height: 100%;
21+
}
22+
</style>
23+
<input id="doc_search" placeholder="Search the doc" autofocus/>
24+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js" onload="docsearch({
25+
apiKey: '512b0d6c0c8578bed7662f5279c2249c',
26+
indexName: 'python-guide',
27+
inputSelector: '#doc_search',
28+
debug: false // Set debug to true if you want to inspect the dropdown
29+
})" async></script>
30+
931
<p>
1032
This opinionated guide exists to provide both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis.
1133
</p>

0 commit comments

Comments
 (0)
0