-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.html
More file actions
28 lines (27 loc) · 983 Bytes
/
search.html
File metadata and controls
28 lines (27 loc) · 983 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
---
layout: search
layout: default
---
<form id="search-bar" action="/search.html" method="get">
<input id="search-box" type="text" id="search-box" placeholder="Search for post..." name="query">
</form>
<h2 id="search-results-label">Search Results</h2>
<ul id="search-results"></ul>
<script>
window.store = {
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"categories": "{{ post.categories }}",
"tags" : '{{ post.tags | jsonify}}',
"date" : "{{ post.date | date: date_format | xml_escape }}",
"content": {{ post.description | strip_html | strip_newlines | jsonify }},
"url": "{{ post.url | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
<script src="/assets/js/lunr.min.js"></script>
<script src="/assets/js/search.js"></script>