-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathsearch-themeinstructions.html
46 lines (41 loc) · 1.31 KB
/
search-themeinstructions.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
45
46
---
layout: default
toc: false
github_button: false
sidebar: themeinstructions
type: search
---
<div style="display:none">
<form action="search-{{page.sidebar}}.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 %}
{% if doc.sidebar == page.sidebar %}
"{{ 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 %}
{% endif %}
{% endunless %}
{% endfor %}{% endfor %}
};
</script>
<script src="assets/js/lunr.min.js"></script>
<script src="assets/js/search.js"></script>