forked from tomjoht/documentation-theme-jekyll-next-version
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
44 lines (40 loc) · 1.23 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
layout: default
toc: false
github_button: false
type: search
sidebar: taglist
search: false
---
<div style="display: none">
<form action="search.html" method="get">
<div class="input-group search">
<input type="text" id="search-box" name="query" class="form-control" placeholder="{{site.uistring.search_placeholder}}">
<div class="input-group-btn">
<button class="btn btn-default" type="submit" value="search">
<i class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>
</div>
<div id="search-results"></div>
<script>
window.store = {
{% for collection in site.collections %}
{% for doc in collection.docs %}
{% unless doc.search == false %}
"{{ doc.url | slugify }}": {
"title": "{{ doc.title | xml_escape }}",
"tags": "{{ doc.tags | xml_escape }}",
"content": {{ doc.content | strip_html | strip_newlines | jsonify }},
"url": "{{ doc.url | remove: '/' | xml_escape }}",
"product": "{{doc.product | xml_escape}}"
}
{% unless forloop.last %},{% endunless %}
{% endunless %}
{% endfor %}{% endfor %}
};
</script>
<script src="assets/js/lunr.min.js"></script>
<script src="assets/js/search.js"></script>