diff --git a/_includes/scripts.html b/_includes/scripts.html
index e685cddf717a..8a454e7bf4d7 100644
--- a/_includes/scripts.html
+++ b/_includes/scripts.html
@@ -11,5 +11,10 @@
{% endif %}
+{% if page.layout == 'search' %}
+
+
+{% endif %}
+
{% include analytics.html %}
{% include /comments-providers/scripts.html %}
diff --git a/_layouts/search.html b/_layouts/search.html
new file mode 100644
index 000000000000..d9cdfe3ed6e1
--- /dev/null
+++ b/_layouts/search.html
@@ -0,0 +1,30 @@
+---
+layout: default
+---
+
+{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
+ {% include page__hero.html %}
+{% endif %}
+
+{% if page.url != "/" and site.breadcrumbs %}
+ {% unless paginator %}
+ {% include breadcrumbs.html %}
+ {% endunless %}
+{% endif %}
+
+
+ {% include sidebar.html %}
+
+
+ {% unless page.header.overlay_color or page.header.overlay_image %}
+
{{ page.title }}
+ {% endunless %}
+
+ {{ content }}
+
+
+
+
+
+
+
diff --git a/_sass/minimal-mistakes/_search.scss b/_sass/minimal-mistakes/_search.scss
new file mode 100644
index 000000000000..90bc98931978
--- /dev/null
+++ b/_sass/minimal-mistakes/_search.scss
@@ -0,0 +1,10 @@
+.search-input {
+ -webkit-appearance: none;
+ border: 0;
+ border-radius: .25em;
+ font-family: inherit;
+ font-size: 1.25em;
+ margin: 2em auto 1em;
+ padding: .5em;
+ width: 100%;
+}
diff --git a/assets/js/lunr-en.js b/assets/js/lunr-en.js
new file mode 100644
index 000000000000..bf0dd27908d0
--- /dev/null
+++ b/assets/js/lunr-en.js
@@ -0,0 +1,92 @@
+---
+
+---
+var idx = lunr(function () {
+ this.field('title', {boost: 10})
+ this.field('excerpt')
+ this.field('categories')
+ this.field('tags')
+ this.ref('id')
+});
+
+{% assign count = 0 %}
+{% for c in site.collections %}
+ {% assign docs = c.docs %}
+ {% for doc in docs %}
+ idx.add({
+ title: {{ doc.title | jsonify }},
+ excerpt: {{ doc.excerpt | strip_html | truncatewords: 20 | jsonify }},
+ categories: {{ doc.categories | jsonify }},
+ tags: {{ doc.tags | jsonify }},
+ id: {{ count }}
+ });
+ {% assign count = count | plus: 1 %}
+ {% endfor %}
+{% endfor %}
+
+console.log( jQuery.type(idx) );
+
+var store = [
+ {% for c in site.collections %}
+ {% if forloop.last %}
+ {% assign l = true %}
+ {% endif %}
+ {% assign docs = c.docs %}
+ {% for doc in docs %}
+ {% if doc.header.teaser %}
+ {% capture teaser %}{{ doc.header.teaser }}{% endcapture %}
+ {% else %}
+ {% assign teaser = site.teaser %}
+ {% endif %}
+ {
+ "title": {{ doc.title | jsonify }},
+ "url": {{ doc.url | absolute_url | jsonify }},
+ "excerpt": {{ doc.content | strip_html | truncatewords: 20 | jsonify }},
+ "teaser":
+ {% if teaser contains "://" %}
+ {{ teaser | jsonify }}
+ {% else %}
+ {{ teaser | absolute_url | jsonify }}
+ {% endif %}
+ }{% unless forloop.last and l %},{% endunless %}
+ {% endfor %}
+ {% endfor %}]
+
+$(document).ready(function() {
+ $('input#search').on('keyup', function () {
+ var resultdiv = $('#results');
+ var query = $(this).val();
+ var result = idx.search(query);
+ resultdiv.empty();
+ resultdiv.prepend('