search.html
---
title: Search
layout: page
excerpt: Search Brightly Colored.
---
{% include search-form.html %}
<ul class="search__results" id="search-results"></ul>
<!-- Let's create our index -->
<script>
window.store = {
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape | widont }}",
"author": "{{ post.author | xml_escape }}",
"category": "{{ post.category | xml_escape }}",
"content": {{ post.content | strip_html | strip_newlines | jsonify }},
"url": "{{ post.url | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
<!-- JS to make this work -->
<script src="https://unpkg.com/lunr/lunr.js"></script>
<script src="/assets/search.js"></script>