-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
26 lines (24 loc) · 889 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
---
layout: default
---
<div class="search" id="search-results"></div>
<script>
window.store = [
{% assign date_format = site.minima.date_format | default: "%d/%m/%Y" %}
{% for post in site.posts %}
{
"id": "{{ post.url | slugify }}",
"title": "{{ post.title | xml_escape }}",
"date": "{{ post.date | date: date_format | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"category": "{{ post.category | xml_escape }}",
"content": {{ post.content | strip_html | strip_newlines | jsonify }},
"excerpt": {{ post.excerpt | jsonify }},
"url": "{{ post.url | xml_escape }}"
}
{% unless forloop.last %}, {% endunless %}
{% endfor %}
];
</script>
<script src="https://unpkg.com/lunr/lunr.js"></script>
<script src="../assets/js/search.js"></script>