-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.html
32 lines (28 loc) · 967 Bytes
/
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
---
title: Search
sitemap: false
---
<p><span id="search-process">Loading</span> results <span id="search-query-container" style="display: none;">for "<strong id="search-query"></strong>"</span></p>
<ul id="search-results"></ul>
<script>
window.data = {
{% for item in site.docs %}
{% if item.title %}
{% unless item.excluded_in_search %}
{% if added %},{% endif %}
{% assign added = false %}
"{{ item.url | slugify }}": {
"id": "{{ item.url | slugify }}",
"title": "{{ item.title | xml_escape }}",
"category": "{{ collection.title | xml_escape }}",
"url": " {{ item.url | xml_escape }}",
"content": {{ item.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
}
{% assign added = true %}
{% endunless %}
{% endif %}
{% endfor %}
};
</script>
<script src="{{ site.baseurl }}/scripts/lunr.min.js"></script>
<script src="{{ site.baseurl }}/scripts/search.js"></script>