-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsearch.html
More file actions
33 lines (31 loc) · 928 Bytes
/
search.html
File metadata and controls
33 lines (31 loc) · 928 Bytes
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
---
layout: home
title: Search Results
---
<!-- List where search results will be rendered -->
<div class="container">
<h3>Search</h3>
{% include search-box-page.html %}
<div class="container">
<ul id="search-results"></ul>
</div>
</div>
{% include navbar.html %}
<script>
// Template to generate the JSON to search
window.store = {
{% for page in site.pages %}
"{{ page.url | slugify }}": {
"title": "{{ page.title | xml_escape }}",
"content": {{ page.content | strip_html | strip_newlines | jsonify }},
"url": "{{ page.url | xml_escape }}",
"index": "{{ page.index }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
<!-- Import lunr.js from unpkg.com -->
<script src="https://unpkg.com/lunr/lunr.js"></script>
<!-- Custom search script which we will create below -->
<script src="/assets/js/search.js"></script>