minimal-mistakes-jekyll 4.9.1 → 4.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9dfedae1d94fb60b3f357f529926f68a58f7c022
4
- data.tar.gz: 9cfb516974eaafab7eca4aa17d8b6ea5be1dac31
3
+ metadata.gz: db0ff676f884e7808ee27d878732452f3e4017bd
4
+ data.tar.gz: db5c76982d11af8ae7ae6bf2159507db88defd75
5
5
  SHA512:
6
- metadata.gz: '055470494a757101a616ce41e3739ed29662c55d5920f6dfd8781138e60c9dbb2b16b294d8fb16bea671692241d73ed32754b5e38b8917d8eb0ae2a61cd1788d'
7
- data.tar.gz: 643579fbdaca73ec03cda899b41d01670209554fd0d8dc301b64e0da27ad74a742aadb56f418f3de10c3094c16f87d1f25da03e8f46da127a77c76a819483a6b
6
+ metadata.gz: 6012184f19b039dcba2d66c84c1e0c45101b7cd7c4c747716bdc5eebef2f05d73541778fec90028c766920e0bd9a733e370c3fec0794de7d32e3b2f54a319b11
7
+ data.tar.gz: b225e340e487a7639804af8dc4c709643defd2a863f4207b088a0935004a27991f2e511f857017332e31860c4cab99ee3352bfc9303dff12c0ab9414c6867758
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [4.10.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.10.0)
2
+
3
+ ### Enhancements
4
+
5
+ * Add support for [Algolia](https://www.algolia.com/) search provider. [#1416](https://github.com/mmistakes/minimal-mistakes/issues/1416)
6
+
1
7
  ## [4.9.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.9.1)
2
8
 
3
9
  ### Enhancements
@@ -9,7 +15,7 @@
9
15
  * Minify `assets/js/lunr/lunr.js`.
10
16
  * Improve calculation of Greedy navigation's `availableSpace`.
11
17
  * Add Danish and Russian translations for new search strings. [#1472](https://github.com/mmistakes/minimal-mistakes/pull/1472) [#1477](https://github.com/mmistakes/minimal-mistakes/pull/1477)
12
- * Indicate that archive title's are links with an underline.
18
+ * Indicate that archive titles are links with an underline.
13
19
  * Remove `base_path` include from `/test` pages.
14
20
  * Reduce font-size of page meta in list/grid items.
15
21
  * Improve feature row styling when used with `archive` layout. [#1484](https://github.com/mmistakes/minimal-mistakes/issues/1484)
data/LICENSE.txt CHANGED
@@ -1,63 +1,63 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2013-2018 Michael Rose and contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/)
24
- creators Garrett Knoll, Arthur Shlain, and Tracy Tam.
25
- Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).
26
-
27
- Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/),
28
- Copyright (c) 2017 Dave Gandy.
29
- Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL)
30
- and [MIT License](http://opensource.org/licenses/MIT).
31
-
32
- Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com).
33
-
34
- Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/),
35
- Copyright (c) 2017, Miriam Eric Suzanne.
36
- Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause).
37
-
38
- Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/).
39
- Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT).
40
-
41
- Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/),
42
- Copyright (c) 2013 Dave Rubert and Chris Coyier.
43
- FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/).
44
-
45
- Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/),
46
- Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com.
47
- Magnific Popup is distributed under the terms of the MIT License.
48
-
49
- Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll),
50
- Copyright (c) 2017 Karl Swedberg.
51
- jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
52
-
53
- Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav),
54
- Copyright (c) 2015 Luke Jackson.
55
- GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
56
-
57
- Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array),
58
- Copyright (c) 2015 Max White <mushishi78@gmail.com>.
59
- Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
60
-
61
- Minimal Mistakes incorporates [Lunr](http://lunrjs.com),
62
- Copyright (c) 2017 Oliver Nightingale.
63
- Lunr is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013-2018 Michael Rose and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/)
24
+ creators Garrett Knoll, Arthur Shlain, and Tracy Tam.
25
+ Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).
26
+
27
+ Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/),
28
+ Copyright (c) 2017 Dave Gandy.
29
+ Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL)
30
+ and [MIT License](http://opensource.org/licenses/MIT).
31
+
32
+ Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com).
33
+
34
+ Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/),
35
+ Copyright (c) 2017, Miriam Eric Suzanne.
36
+ Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause).
37
+
38
+ Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/).
39
+ Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT).
40
+
41
+ Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/),
42
+ Copyright (c) 2013 Dave Rubert and Chris Coyier.
43
+ FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/).
44
+
45
+ Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/),
46
+ Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com.
47
+ Magnific Popup is distributed under the terms of the MIT License.
48
+
49
+ Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll),
50
+ Copyright (c) 2017 Karl Swedberg.
51
+ jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
52
+
53
+ Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav),
54
+ Copyright (c) 2015 Luke Jackson.
55
+ GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
56
+
57
+ Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array),
58
+ Copyright (c) 2015 Max White <mushishi78@gmail.com>.
59
+ Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
60
+
61
+ Minimal Mistakes incorporates [Lunr](http://lunrjs.com),
62
+ Copyright (c) 2017 Oliver Nightingale.
63
+ Lunr is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # [Minimal Mistakes Jekyll Theme](https://mmistakes.github.io/minimal-mistakes/)
2
2
 
3
- [![GitHub release](https://img.shields.io/gem/v/minimal-mistakes-jekyll.svg)](https://github.com/mmistakes/minimal-mistakes/releases) [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE.txt)
3
+ [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE.txt)
4
+ [![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%203.6-blue.svg)](https://jekyllrb.com/)
5
+ [![Ruby gem](https://img.shields.io/gem/v/minimal-mistakes-jekyll.svg)](https://rubygems.org/gems/minimal-mistakes-jekyll)
6
+ [![Tip Me via PayPal](https://img.shields.io/badge/PayPal-tip%20me-green.svg?logo=paypal)](https://www.paypal.me/mmistakes)
4
7
 
5
8
  Minimal Mistakes is a flexible two-column Jekyll theme. Perfect for hosting your personal site, blog, or portfolio on GitHub or self-hosting on your own server. As the name implies --- styling is purposely minimalistic to be enhanced and customized by you :smile:.
6
9
 
@@ -13,16 +13,13 @@
13
13
  {% endif %}
14
14
 
15
15
  {% if site.search == true or page.layout == "search" %}
16
- {% assign lang = site.locale | slice: 0,2 | default: "en" %}
17
- {% case lang %}
18
- {% when "gr" %}
19
- {% assign lang = "gr" %}
20
- {% else %}
21
- {% assign lang = "en" %}
22
- {% endcase %}
23
- <script src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
24
- <script src="{{ '/assets/js/lunr/lunr-store.js' | absolute_url }}"></script>
25
- <script src="{{ '/assets/js/lunr/lunr-' | append: lang | append: '.js' | absolute_url }}"></script>
16
+ {%- assign search_provider = site.search_provider | default: "lunr" -%}
17
+ {%- case search_provider -%}
18
+ {%- when "lunr" -%}
19
+ {% include search/lunr-search-scripts.html %}
20
+ {%- when "algolia" -%}
21
+ {% include search/algolia-search-scripts.html %}
22
+ {%- endcase -%}
26
23
  {% endif %}
27
24
 
28
25
  {% include analytics.html %}
@@ -0,0 +1,54 @@
1
+ <!-- Including InstantSearch.js library and styling -->
2
+ <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch.min.js"></script>
3
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch.min.css">
4
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch-theme-algolia.min.css">
5
+
6
+ <script>
7
+ // Instanciating InstantSearch.js with Algolia credentials
8
+ const search = instantsearch({
9
+ appId: '{{ site.algolia.application_id }}',
10
+ apiKey: '{{ site.algolia.search_only_api_key }}',
11
+ indexName: '{{ site.algolia.index_name }}',
12
+ searchParameters: {
13
+ restrictSearchableAttributes: [
14
+ 'title',
15
+ 'content'
16
+ ]
17
+ }
18
+ });
19
+
20
+ const hitTemplate = function(hit) {
21
+ const url = hit.url;
22
+ const title = hit._highlightResult.title.value;
23
+ const content = hit._highlightResult.html.value;
24
+
25
+ return `
26
+ <div class="list__item">
27
+ <article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
28
+ <h2 class="archive__item-title" itemprop="headline"><a href="{{ site.baseurl }}${url}">${title}</a></h2>
29
+ <div class="archive__item-excerpt" itemprop="description">${content}</div>
30
+ </article>
31
+ </div>
32
+ `;
33
+ }
34
+
35
+ // Adding searchbar and results widgets
36
+ search.addWidget(
37
+ instantsearch.widgets.searchBox({
38
+ container: '.search-searchbar',
39
+ {% unless site.algolia.powered_by == false %}poweredBy: true,{% endunless %}
40
+ placeholder: '{{ site.data.ui-text[site.locale].search_placeholder_text | default: "Enter your search term..." }}'
41
+ })
42
+ );
43
+ search.addWidget(
44
+ instantsearch.widgets.hits({
45
+ container: '.search-hits',
46
+ templates: {
47
+ item: hitTemplate
48
+ }
49
+ })
50
+ );
51
+
52
+ // Starting the search
53
+ search.start();
54
+ </script>
@@ -0,0 +1,10 @@
1
+ {% assign lang = site.locale | slice: 0,2 | default: "en" %}
2
+ {% case lang %}
3
+ {% when "gr" %}
4
+ {% assign lang = "gr" %}
5
+ {% else %}
6
+ {% assign lang = "en" %}
7
+ {% endcase %}
8
+ <script src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
9
+ <script src="{{ '/assets/js/lunr/lunr-store.js' | absolute_url }}"></script>
10
+ <script src="{{ '/assets/js/lunr/lunr-' | append: lang | append: '.js' | absolute_url }}"></script>
@@ -0,0 +1,11 @@
1
+ <div class="search-content__inner-wrap">
2
+ {%- assign search_provider = site.search_provider | default: "lunr" -%}
3
+ {%- case search_provider -%}
4
+ {%- when "lunr" -%}
5
+ <input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
6
+ <div id="results" class="results"></div>
7
+ {%- when "algolia" -%}
8
+ <div class="search-searchbar"></div>
9
+ <div class="search-hits"></div>
10
+ {%- endcase -%}
11
+ </div>
@@ -3,7 +3,7 @@
3
3
 
4
4
  <!doctype html>
5
5
  <!--
6
- Minimal Mistakes Jekyll Theme 4.9.1 by Michael Rose
6
+ Minimal Mistakes Jekyll Theme 4.10.0 by Michael Rose
7
7
  Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes
8
8
  Free for personal and commercial use under the MIT license
9
9
  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
@@ -25,7 +25,7 @@
25
25
 
26
26
  {% if site.search == true %}
27
27
  <div class="search-content">
28
- {% include search_form.html %}
28
+ {% include search/search_form.html %}
29
29
  </div>
30
30
  {% endif %}
31
31
 
data/_layouts/search.html CHANGED
@@ -22,11 +22,14 @@ layout: default
22
22
 
23
23
  {{ content }}
24
24
 
25
- <form>
26
- <input type="input" id="search" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
27
- </form>
28
-
29
- <div id="results"></div>
30
-
25
+ {%- assign search_provider = site.search_provider | default: "lunr" -%}
26
+ {%- case search_provider -%}
27
+ {%- when "lunr" -%}
28
+ <input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
29
+ <div id="results" class="results"></div>
30
+ {%- when "algolia" -%}
31
+ <div class="search-searchbar"></div>
32
+ <div class="search-hits"></div>
33
+ {%- endcase -%}
31
34
  </div>
32
35
  </div>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Minimal Mistakes Jekyll Theme 4.9.1 by Michael Rose
2
+ * Minimal Mistakes Jekyll Theme 4.10.0 by Michael Rose
3
3
  * Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes
4
4
  * Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt)
5
5
  */
@@ -105,3 +105,21 @@
105
105
  margin-bottom: 0;
106
106
  }
107
107
  }
108
+
109
+ /* Algolia search */
110
+
111
+ .ais-search-box {
112
+ max-width: 100% !important;
113
+ margin-bottom: 2em;
114
+ }
115
+
116
+ .archive__item-title .ais-Highlight {
117
+ color: $link-color;
118
+ font-style: normal;
119
+ text-decoration: underline;
120
+ }
121
+ .archive__item-excerpt .ais-Highlight {
122
+ color: $link-color;
123
+ font-style: normal;
124
+ font-weight: bold;
125
+ }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Minimal Mistakes Jekyll Theme 4.9.1 by Michael Rose
2
+ * Minimal Mistakes Jekyll Theme 4.10.0 by Michael Rose
3
3
  * Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes
4
4
  * Licensed under MIT
5
5
  */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal-mistakes-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.9.1
4
+ version: 4.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Rose
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-05 00:00:00.000000000 Z
11
+ date: 2018-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -185,7 +185,9 @@ files:
185
185
  - _includes/post_pagination.html
186
186
  - _includes/read-time.html
187
187
  - _includes/scripts.html
188
- - _includes/search_form.html
188
+ - _includes/search/algolia-search-scripts.html
189
+ - _includes/search/lunr-search-scripts.html
190
+ - _includes/search/search_form.html
189
191
  - _includes/seo.html
190
192
  - _includes/sidebar.html
191
193
  - _includes/social-share.html
@@ -1,4 +0,0 @@
1
- <div class="search-content__inner-wrap">
2
- <input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
3
- <div id="results" class="results"></div>
4
- </div>