minimal-mistakes-jekyll 4.20.1 → 4.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -1
- data/README.md +11 -10
- data/_data/ui-text.yml +194 -24
- data/_includes/archive-single.html +2 -2
- data/_includes/category-list.html +2 -9
- data/_includes/comments-providers/giscus.html +24 -0
- data/_includes/comments-providers/scripts.html +2 -0
- data/_includes/comments.html +4 -1
- data/_includes/documents-collection.html +6 -12
- data/_includes/figure +2 -2
- data/_includes/footer.html +3 -1
- data/_includes/head.html +5 -17
- data/_includes/masthead.html +2 -4
- data/_includes/page__date.html +3 -2
- data/_includes/page__hero.html +7 -3
- data/_includes/page__meta.html +31 -0
- data/_includes/seo.html +6 -0
- data/_includes/skip-links.html +0 -1
- data/_includes/tag-list.html +2 -9
- data/_includes/toc.html +128 -42
- data/_layouts/categories.html +3 -2
- data/_layouts/category.html +3 -2
- data/_layouts/collection.html +3 -2
- data/_layouts/default.html +2 -2
- data/_layouts/posts.html +3 -2
- data/_layouts/search.html +2 -2
- data/_layouts/single.html +2 -2
- data/_layouts/tag.html +3 -2
- data/_layouts/tags.html +3 -2
- data/_sass/minimal-mistakes.scss +2 -2
- data/_sass/minimal-mistakes/_archive.scss +8 -0
- data/_sass/minimal-mistakes/_footer.scss +0 -1
- data/_sass/minimal-mistakes/_forms.scss +0 -34
- data/_sass/minimal-mistakes/_navigation.scss +7 -0
- data/_sass/minimal-mistakes/_notices.scss +5 -5
- data/_sass/minimal-mistakes/_page.scss +1 -1
- data/_sass/minimal-mistakes/_sidebar.scss +0 -1
- data/_sass/minimal-mistakes/_variables.scss +4 -0
- data/_sass/minimal-mistakes/skins/_aqua.scss +5 -1
- data/_sass/minimal-mistakes/skins/_contrast.scss +2 -1
- data/_sass/minimal-mistakes/skins/_dark.scss +4 -2
- data/_sass/minimal-mistakes/skins/_mint.scss +1 -0
- data/_sass/minimal-mistakes/skins/_neon.scss +7 -1
- data/_sass/minimal-mistakes/skins/_plum.scss +7 -1
- data/_sass/minimal-mistakes/skins/_sunrise.scss +7 -2
- data/assets/js/_main.js +2 -2
- data/assets/js/lunr/lunr-store.js +2 -2
- data/assets/js/lunr/lunr.js +67 -76
- data/assets/js/lunr/lunr.min.js +6 -1
- data/assets/js/main.min.js +3 -6
- data/assets/js/plugins/jquery.greedy-navigation.js +67 -14
- data/assets/js/vendor/jquery/{jquery-3.4.1.js → jquery-3.5.1.js} +756 -482
- metadata +5 -4
- data/_includes/post__meta.html +0 -35
data/_layouts/categories.html
CHANGED
@@ -25,14 +25,15 @@ layout: archive
|
|
25
25
|
{% endfor %}
|
26
26
|
</ul>
|
27
27
|
|
28
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
28
29
|
{% for i in (1..categories_max) reversed %}
|
29
30
|
{% for category in site.categories %}
|
30
31
|
{% if category[1].size == i %}
|
31
32
|
<section id="{{ category[0] | slugify | downcase }}" class="taxonomy__section">
|
32
33
|
<h2 class="archive__subtitle">{{ category[0] }}</h2>
|
33
|
-
<div class="entries-{{
|
34
|
+
<div class="entries-{{ entries_layout }}">
|
34
35
|
{% for post in category.last %}
|
35
|
-
{% include archive-single.html type=
|
36
|
+
{% include archive-single.html type=entries_layout %}
|
36
37
|
{% endfor %}
|
37
38
|
</div>
|
38
39
|
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
data/_layouts/category.html
CHANGED
@@ -4,6 +4,7 @@ layout: archive
|
|
4
4
|
|
5
5
|
{{ content }}
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
8
|
+
<div class="entries-{{ entries_layout }}">
|
9
|
+
{% include posts-category.html taxonomy=page.taxonomy type=entries_layout %}
|
9
10
|
</div>
|
data/_layouts/collection.html
CHANGED
@@ -4,6 +4,7 @@ layout: archive
|
|
4
4
|
|
5
5
|
{{ content }}
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
8
|
+
<div class="entries-{{ entries_layout }}">
|
9
|
+
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=entries_layout %}
|
9
10
|
</div>
|
data/_layouts/default.html
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
<!doctype html>
|
5
5
|
<!--
|
6
|
-
Minimal Mistakes Jekyll Theme 4.
|
7
|
-
Copyright 2013-
|
6
|
+
Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose
|
7
|
+
Copyright 2013-2020 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
|
10
10
|
-->
|
data/_layouts/posts.html
CHANGED
@@ -15,13 +15,14 @@ layout: archive
|
|
15
15
|
{% endfor %}
|
16
16
|
</ul>
|
17
17
|
|
18
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
18
19
|
{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y"' %}
|
19
20
|
{% for year in postsByYear %}
|
20
21
|
<section id="{{ year.name }}" class="taxonomy__section">
|
21
22
|
<h2 class="archive__subtitle">{{ year.name }}</h2>
|
22
|
-
<div class="entries-{{
|
23
|
+
<div class="entries-{{ entries_layout }}">
|
23
24
|
{% for post in year.items %}
|
24
|
-
{% include archive-single.html type=
|
25
|
+
{% include archive-single.html type=entries_layout %}
|
25
26
|
{% endfor %}
|
26
27
|
</div>
|
27
28
|
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
data/_layouts/search.html
CHANGED
@@ -25,11 +25,11 @@ layout: default
|
|
25
25
|
{%- assign search_provider = site.search_provider | default: "lunr" -%}
|
26
26
|
{%- case search_provider -%}
|
27
27
|
{%- when "lunr" -%}
|
28
|
-
<input type="text" id="search" class="search-input"
|
28
|
+
<input type="text" id="search" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
|
29
29
|
<div id="results" class="results"></div>
|
30
30
|
{%- when "google" -%}
|
31
31
|
<form onsubmit="return googleCustomSearchExecute();" id="cse-search-box-form-id">
|
32
|
-
<input type="text" id="cse-search-input-box-id" class="search-input"
|
32
|
+
<input type="text" id="cse-search-input-box-id" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
|
33
33
|
</form>
|
34
34
|
<div id="results" class="results">
|
35
35
|
<gcse:searchresults-only></gcse:searchresults-only>
|
data/_layouts/single.html
CHANGED
@@ -27,7 +27,7 @@ layout: default
|
|
27
27
|
{% unless page.header.overlay_color or page.header.overlay_image %}
|
28
28
|
<header>
|
29
29
|
{% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
|
30
|
-
{% include
|
30
|
+
{% include page__meta.html %}
|
31
31
|
</header>
|
32
32
|
{% endunless %}
|
33
33
|
|
@@ -36,7 +36,7 @@ layout: default
|
|
36
36
|
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
|
37
37
|
<nav class="toc">
|
38
38
|
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
|
39
|
-
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %}
|
39
|
+
{% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" skip_no_ids=true %}
|
40
40
|
</nav>
|
41
41
|
</aside>
|
42
42
|
{% endif %}
|
data/_layouts/tag.html
CHANGED
@@ -4,6 +4,7 @@ layout: archive
|
|
4
4
|
|
5
5
|
{{ content }}
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
8
|
+
<div class="entries-{{ entries_layout }}">
|
9
|
+
{% include posts-tag.html taxonomy=page.taxonomy type=entries_layout %}
|
9
10
|
</div>
|
data/_layouts/tags.html
CHANGED
@@ -25,14 +25,15 @@ layout: archive
|
|
25
25
|
{% endfor %}
|
26
26
|
</ul>
|
27
27
|
|
28
|
+
{% assign entries_layout = page.entries_layout | default: 'list' %}
|
28
29
|
{% for i in (1..tags_max) reversed %}
|
29
30
|
{% for tag in site.tags %}
|
30
31
|
{% if tag[1].size == i %}
|
31
32
|
<section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
|
32
33
|
<h2 class="archive__subtitle">{{ tag[0] }}</h2>
|
33
|
-
<div class="entries-{{
|
34
|
+
<div class="entries-{{ entries_layout }}">
|
34
35
|
{% for post in tag.last %}
|
35
|
-
{% include archive-single.html type=
|
36
|
+
{% include archive-single.html type=entries_layout %}
|
36
37
|
{% endfor %}
|
37
38
|
</div>
|
38
39
|
<a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} ↑</a>
|
data/_sass/minimal-mistakes.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* Minimal Mistakes Jekyll Theme 4.
|
3
|
-
* Copyright 2013-
|
2
|
+
* Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose
|
3
|
+
* Copyright 2013-2020 Michael Rose - mademistakes.com | @mmistakes
|
4
4
|
* Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE)
|
5
5
|
*/
|
6
6
|
|
@@ -357,37 +357,3 @@ select:focus {
|
|
357
357
|
left: 50%;
|
358
358
|
z-index: 11;
|
359
359
|
}
|
360
|
-
|
361
|
-
/*
|
362
|
-
Google search form
|
363
|
-
========================================================================== */
|
364
|
-
|
365
|
-
#goog-fixurl {
|
366
|
-
ul {
|
367
|
-
list-style: none;
|
368
|
-
margin-left: 0;
|
369
|
-
padding-left: 0;
|
370
|
-
li {
|
371
|
-
list-style-type: none;
|
372
|
-
}
|
373
|
-
}
|
374
|
-
}
|
375
|
-
|
376
|
-
#goog-wm-qt {
|
377
|
-
width: auto;
|
378
|
-
margin-right: 10px;
|
379
|
-
margin-bottom: 20px;
|
380
|
-
padding: 8px 20px;
|
381
|
-
display: inline-block;
|
382
|
-
font-size: $type-size-6;
|
383
|
-
background-color: #fff;
|
384
|
-
color: #000;
|
385
|
-
border-width: 2px !important;
|
386
|
-
border-style: solid !important;
|
387
|
-
border-color: $border-color;
|
388
|
-
border-radius: $border-radius;
|
389
|
-
}
|
390
|
-
|
391
|
-
#goog-wm-sb {
|
392
|
-
@extend .btn;
|
393
|
-
}
|
@@ -184,6 +184,8 @@
|
|
184
184
|
margin: 0 1rem;
|
185
185
|
color: $masthead-link-color;
|
186
186
|
text-decoration: none;
|
187
|
+
-webkit-transition: none;
|
188
|
+
transition: none;
|
187
189
|
|
188
190
|
&:hover {
|
189
191
|
color: $masthead-link-color-hover;
|
@@ -198,6 +200,11 @@
|
|
198
200
|
margin-left: 0;
|
199
201
|
}
|
200
202
|
}
|
203
|
+
|
204
|
+
img{
|
205
|
+
-webkit-transition: none;
|
206
|
+
transition: none;
|
207
|
+
}
|
201
208
|
|
202
209
|
&__toggle {
|
203
210
|
-ms-flex-item-align: center;
|
@@ -13,11 +13,11 @@
|
|
13
13
|
@mixin notice($notice-color) {
|
14
14
|
margin: 2em 0 !important; /* override*/
|
15
15
|
padding: 1em;
|
16
|
-
color: $
|
16
|
+
color: $text-color;
|
17
17
|
font-family: $global-font-family;
|
18
18
|
font-size: $type-size-6 !important;
|
19
19
|
text-indent: initial; /* override*/
|
20
|
-
background-color: mix(
|
20
|
+
background-color: mix($background-color, $notice-color, $notice-background-mix);
|
21
21
|
border-radius: $border-radius;
|
22
22
|
box-shadow: 0 1px 1px rgba($notice-color, 0.25);
|
23
23
|
|
@@ -46,15 +46,15 @@
|
|
46
46
|
}
|
47
47
|
|
48
48
|
a {
|
49
|
-
color: $notice-color;
|
49
|
+
color: mix(#000, $notice-color, 10%);
|
50
50
|
|
51
51
|
&:hover {
|
52
|
-
color: mix(#000, $notice-color,
|
52
|
+
color: mix(#000, $notice-color, 50%);
|
53
53
|
}
|
54
54
|
}
|
55
55
|
|
56
56
|
code {
|
57
|
-
background-color: mix(
|
57
|
+
background-color: mix($background-color, $notice-color, $code-notice-background-mix)
|
58
58
|
}
|
59
59
|
|
60
60
|
pre code {
|
@@ -118,6 +118,10 @@ $masthead-link-color: $primary-color !default;
|
|
118
118
|
$masthead-link-color-hover: mix(#000, $primary-color, 25%) !default;
|
119
119
|
$navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default;
|
120
120
|
|
121
|
+
/* notices */
|
122
|
+
$notice-background-mix: 80% !default;
|
123
|
+
$code-notice-background-mix: 90% !default;
|
124
|
+
|
121
125
|
/* syntax highlighting (base16) */
|
122
126
|
$base00: #263238 !default;
|
123
127
|
$base01: #2e3c43 !default;
|
@@ -27,4 +27,8 @@ $link-color : $info-color !default;
|
|
27
27
|
$link-color-hover : mix(#000, $link-color, 25%) !default;
|
28
28
|
$link-color-visited : mix(#fff, $link-color, 25%) !default;
|
29
29
|
$masthead-link-color : $primary-color !default;
|
30
|
-
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
|
30
|
+
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
|
31
|
+
|
32
|
+
/* notices */
|
33
|
+
$notice-background-mix: 90% !default;
|
34
|
+
$code-notice-background-mix: 95% !default;
|
@@ -18,11 +18,13 @@ $masthead-link-color: $text-color !default;
|
|
18
18
|
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
19
19
|
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
20
20
|
|
21
|
+
.author__urls.social-icons i,
|
21
22
|
.author__urls.social-icons .svg-inline--fa,
|
22
|
-
.page__footer-follow .social-icons
|
23
|
+
.page__footer-follow .social-icons i,
|
24
|
+
.page__footer-follow .social-icons .svg-inline--fa {
|
23
25
|
color: inherit;
|
24
26
|
}
|
25
27
|
|
26
28
|
.ais-search-box .ais-search-box--input {
|
27
29
|
background-color: $form-background-color;
|
28
|
-
}
|
30
|
+
}
|
@@ -18,6 +18,10 @@ $masthead-link-color: $text-color !default;
|
|
18
18
|
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
19
19
|
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
20
20
|
|
21
|
+
/* notices */
|
22
|
+
$notice-background-mix: 90% !default;
|
23
|
+
$code-notice-background-mix: 95% !default;
|
24
|
+
|
21
25
|
/* neon syntax highlighting (base16) */
|
22
26
|
$base00: #ffffff !default;
|
23
27
|
$base01: #e0e0e0 !default;
|
@@ -36,8 +40,10 @@ $base0d: #3777e6 !default;
|
|
36
40
|
$base0e: #ad00a1 !default;
|
37
41
|
$base0f: #cc6633 !default;
|
38
42
|
|
43
|
+
.author__urls.social-icons i,
|
39
44
|
.author__urls.social-icons .svg-inline--fa,
|
40
|
-
.page__footer-follow .social-icons
|
45
|
+
.page__footer-follow .social-icons i,
|
46
|
+
.page__footer-follow .social-icons .svg-inline--fa {
|
41
47
|
color: inherit;
|
42
48
|
}
|
43
49
|
|
@@ -18,6 +18,10 @@ $masthead-link-color: $text-color !default;
|
|
18
18
|
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
19
19
|
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
20
20
|
|
21
|
+
/* notices */
|
22
|
+
$notice-background-mix: 70% !default;
|
23
|
+
$code-notice-background-mix: 80% !default;
|
24
|
+
|
21
25
|
/* plum syntax highlighting (base16) */
|
22
26
|
$base00: #ffffff !default;
|
23
27
|
$base01: #e0e0e0 !default;
|
@@ -36,8 +40,10 @@ $base0d: #3777e6 !default;
|
|
36
40
|
$base0e: #ad00a1 !default;
|
37
41
|
$base0f: #cc6633 !default;
|
38
42
|
|
43
|
+
.author__urls.social-icons i,
|
39
44
|
.author__urls.social-icons .svg-inline--fa,
|
40
|
-
.page__footer-follow .social-icons
|
45
|
+
.page__footer-follow .social-icons i,
|
46
|
+
.page__footer-follow .social-icons .svg-inline--fa {
|
41
47
|
color: inherit;
|
42
48
|
}
|
43
49
|
|
@@ -20,6 +20,9 @@ $masthead-link-color: $text-color !default;
|
|
20
20
|
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
21
21
|
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
22
22
|
|
23
|
+
/* notices */
|
24
|
+
$notice-background-mix: 75% !default;
|
25
|
+
|
23
26
|
/* sunrise syntax highlighting (base16) */
|
24
27
|
$base00: #1d1f21 !default;
|
25
28
|
$base01: #282a2e !default;
|
@@ -38,7 +41,9 @@ $base0d: #81a2be !default;
|
|
38
41
|
$base0e: #b294bb !default;
|
39
42
|
$base0f: #a3685a !default;
|
40
43
|
|
41
|
-
.author__urls.social-icons
|
42
|
-
.
|
44
|
+
.author__urls.social-icons i,
|
45
|
+
.author__urls.social-icons .svg-inline--fa,
|
46
|
+
.page__footer-follow .social-icons i,
|
47
|
+
.page__footer-follow .social-icons .svg-inline--fa {
|
43
48
|
color: inherit;
|
44
49
|
}
|
data/assets/js/_main.js
CHANGED
@@ -83,7 +83,7 @@ $(document).ready(function() {
|
|
83
83
|
|
84
84
|
// add lightbox class to all image links
|
85
85
|
$(
|
86
|
-
"a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']"
|
86
|
+
"a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']"
|
87
87
|
).addClass("image-popup");
|
88
88
|
|
89
89
|
// Magnific-Popup options
|
@@ -128,7 +128,7 @@ $(document).ready(function() {
|
|
128
128
|
var anchor = document.createElement("a");
|
129
129
|
anchor.className = 'header-link';
|
130
130
|
anchor.href = '#' + id;
|
131
|
-
anchor.innerHTML = '<span class=\"sr-only\">Permalink</span><i class=\"
|
131
|
+
anchor.innerHTML = '<span class=\"sr-only\">Permalink</span><i class=\"fas fa-link\"></i>';
|
132
132
|
anchor.title = "Permalink";
|
133
133
|
$(this).append(anchor);
|
134
134
|
}
|
@@ -42,8 +42,8 @@ var store = [
|
|
42
42
|
{%- endif -%}
|
43
43
|
"categories": {{ doc.categories | jsonify }},
|
44
44
|
"tags": {{ doc.tags | jsonify }},
|
45
|
-
"url": {{ doc.url |
|
46
|
-
"teaser": {{ teaser |
|
45
|
+
"url": {{ doc.url | relative_url | jsonify }},
|
46
|
+
"teaser": {{ teaser | relative_url | jsonify }}
|
47
47
|
}{%- unless forloop.last and l -%},{%- endunless -%}
|
48
48
|
{%- endfor -%}
|
49
49
|
{%- endfor -%}]
|
data/assets/js/lunr/lunr.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.
|
3
|
-
* Copyright (C)
|
2
|
+
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
|
3
|
+
* Copyright (C) 2020 Oliver Nightingale
|
4
4
|
* @license MIT
|
5
5
|
*/
|
6
6
|
|
@@ -54,10 +54,10 @@ var lunr = function (config) {
|
|
54
54
|
return builder.build()
|
55
55
|
}
|
56
56
|
|
57
|
-
lunr.version = "2.3.
|
57
|
+
lunr.version = "2.3.9"
|
58
58
|
/*!
|
59
59
|
* lunr.utils
|
60
|
-
* Copyright (C)
|
60
|
+
* Copyright (C) 2020 Oliver Nightingale
|
61
61
|
*/
|
62
62
|
|
63
63
|
/**
|
@@ -177,7 +177,7 @@ lunr.FieldRef.prototype.toString = function () {
|
|
177
177
|
}
|
178
178
|
/*!
|
179
179
|
* lunr.Set
|
180
|
-
* Copyright (C)
|
180
|
+
* Copyright (C) 2020 Oliver Nightingale
|
181
181
|
*/
|
182
182
|
|
183
183
|
/**
|
@@ -211,8 +211,8 @@ lunr.Set.complete = {
|
|
211
211
|
return other
|
212
212
|
},
|
213
213
|
|
214
|
-
union: function (
|
215
|
-
return
|
214
|
+
union: function () {
|
215
|
+
return this
|
216
216
|
},
|
217
217
|
|
218
218
|
contains: function () {
|
@@ -389,7 +389,7 @@ lunr.Token.prototype.clone = function (fn) {
|
|
389
389
|
}
|
390
390
|
/*!
|
391
391
|
* lunr.tokenizer
|
392
|
-
* Copyright (C)
|
392
|
+
* Copyright (C) 2020 Oliver Nightingale
|
393
393
|
*/
|
394
394
|
|
395
395
|
/**
|
@@ -424,7 +424,7 @@ lunr.tokenizer = function (obj, metadata) {
|
|
424
424
|
})
|
425
425
|
}
|
426
426
|
|
427
|
-
var str = obj.toString().
|
427
|
+
var str = obj.toString().toLowerCase(),
|
428
428
|
len = str.length,
|
429
429
|
tokens = []
|
430
430
|
|
@@ -465,7 +465,7 @@ lunr.tokenizer = function (obj, metadata) {
|
|
465
465
|
lunr.tokenizer.separator = /[\s\-]+/
|
466
466
|
/*!
|
467
467
|
* lunr.Pipeline
|
468
|
-
* Copyright (C)
|
468
|
+
* Copyright (C) 2020 Oliver Nightingale
|
469
469
|
*/
|
470
470
|
|
471
471
|
/**
|
@@ -509,8 +509,8 @@ lunr.Pipeline.registeredFunctions = Object.create(null)
|
|
509
509
|
* or mutate (or add) metadata for a given token.
|
510
510
|
*
|
511
511
|
* A pipeline function can indicate that the passed token should be discarded by returning
|
512
|
-
* null. This token will not be passed to any downstream pipeline
|
513
|
-
* added to the index.
|
512
|
+
* null, undefined or an empty string. This token will not be passed to any downstream pipeline
|
513
|
+
* functions and will not be added to the index.
|
514
514
|
*
|
515
515
|
* Multiple tokens can be returned by returning an array of tokens. Each token will be passed
|
516
516
|
* to any downstream pipeline functions and all will returned tokens will be added to the index.
|
@@ -673,7 +673,7 @@ lunr.Pipeline.prototype.run = function (tokens) {
|
|
673
673
|
for (var j = 0; j < tokens.length; j++) {
|
674
674
|
var result = fn(tokens[j], j, tokens)
|
675
675
|
|
676
|
-
if (result === void 0 || result === '') continue
|
676
|
+
if (result === null || result === void 0 || result === '') continue
|
677
677
|
|
678
678
|
if (Array.isArray(result)) {
|
679
679
|
for (var k = 0; k < result.length; k++) {
|
@@ -732,7 +732,7 @@ lunr.Pipeline.prototype.toJSON = function () {
|
|
732
732
|
}
|
733
733
|
/*!
|
734
734
|
* lunr.Vector
|
735
|
-
* Copyright (C)
|
735
|
+
* Copyright (C) 2020 Oliver Nightingale
|
736
736
|
*/
|
737
737
|
|
738
738
|
/**
|
@@ -929,7 +929,7 @@ lunr.Vector.prototype.toJSON = function () {
|
|
929
929
|
/* eslint-disable */
|
930
930
|
/*!
|
931
931
|
* lunr.stemmer
|
932
|
-
* Copyright (C)
|
932
|
+
* Copyright (C) 2020 Oliver Nightingale
|
933
933
|
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
934
934
|
*/
|
935
935
|
|
@@ -1151,7 +1151,7 @@ lunr.stemmer = (function(){
|
|
1151
1151
|
lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')
|
1152
1152
|
/*!
|
1153
1153
|
* lunr.stopWordFilter
|
1154
|
-
* Copyright (C)
|
1154
|
+
* Copyright (C) 2020 Oliver Nightingale
|
1155
1155
|
*/
|
1156
1156
|
|
1157
1157
|
/**
|
@@ -1316,7 +1316,7 @@ lunr.stopWordFilter = lunr.generateStopWordFilter([
|
|
1316
1316
|
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')
|
1317
1317
|
/*!
|
1318
1318
|
* lunr.trimmer
|
1319
|
-
* Copyright (C)
|
1319
|
+
* Copyright (C) 2020 Oliver Nightingale
|
1320
1320
|
*/
|
1321
1321
|
|
1322
1322
|
/**
|
@@ -1343,7 +1343,7 @@ lunr.trimmer = function (token) {
|
|
1343
1343
|
lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')
|
1344
1344
|
/*!
|
1345
1345
|
* lunr.TokenSet
|
1346
|
-
* Copyright (C)
|
1346
|
+
* Copyright (C) 2020 Oliver Nightingale
|
1347
1347
|
*/
|
1348
1348
|
|
1349
1349
|
/**
|
@@ -1469,41 +1469,49 @@ lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
|
|
1469
1469
|
})
|
1470
1470
|
}
|
1471
1471
|
|
1472
|
+
if (frame.editsRemaining == 0) {
|
1473
|
+
continue
|
1474
|
+
}
|
1475
|
+
|
1476
|
+
// insertion
|
1477
|
+
if ("*" in frame.node.edges) {
|
1478
|
+
var insertionNode = frame.node.edges["*"]
|
1479
|
+
} else {
|
1480
|
+
var insertionNode = new lunr.TokenSet
|
1481
|
+
frame.node.edges["*"] = insertionNode
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
if (frame.str.length == 0) {
|
1485
|
+
insertionNode.final = true
|
1486
|
+
}
|
1487
|
+
|
1488
|
+
stack.push({
|
1489
|
+
node: insertionNode,
|
1490
|
+
editsRemaining: frame.editsRemaining - 1,
|
1491
|
+
str: frame.str
|
1492
|
+
})
|
1493
|
+
|
1472
1494
|
// deletion
|
1473
1495
|
// can only do a deletion if we have enough edits remaining
|
1474
1496
|
// and if there are characters left to delete in the string
|
1475
|
-
if (frame.
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
} else {
|
1482
|
-
deletionNode = new lunr.TokenSet
|
1483
|
-
frame.node.edges[char] = deletionNode
|
1484
|
-
}
|
1485
|
-
|
1486
|
-
if (frame.str.length <= 2) {
|
1487
|
-
deletionNode.final = true
|
1488
|
-
} else {
|
1489
|
-
stack.push({
|
1490
|
-
node: deletionNode,
|
1491
|
-
editsRemaining: frame.editsRemaining - 1,
|
1492
|
-
str: frame.str.slice(2)
|
1493
|
-
})
|
1494
|
-
}
|
1497
|
+
if (frame.str.length > 1) {
|
1498
|
+
stack.push({
|
1499
|
+
node: frame.node,
|
1500
|
+
editsRemaining: frame.editsRemaining - 1,
|
1501
|
+
str: frame.str.slice(1)
|
1502
|
+
})
|
1495
1503
|
}
|
1496
1504
|
|
1497
1505
|
// deletion
|
1498
1506
|
// just removing the last character from the str
|
1499
|
-
if (frame.
|
1507
|
+
if (frame.str.length == 1) {
|
1500
1508
|
frame.node.final = true
|
1501
1509
|
}
|
1502
1510
|
|
1503
1511
|
// substitution
|
1504
1512
|
// can only do a substitution if we have enough edits remaining
|
1505
1513
|
// and if there are characters left to substitute
|
1506
|
-
if (frame.
|
1514
|
+
if (frame.str.length >= 1) {
|
1507
1515
|
if ("*" in frame.node.edges) {
|
1508
1516
|
var substitutionNode = frame.node.edges["*"]
|
1509
1517
|
} else {
|
@@ -1513,40 +1521,19 @@ lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
|
|
1513
1521
|
|
1514
1522
|
if (frame.str.length == 1) {
|
1515
1523
|
substitutionNode.final = true
|
1516
|
-
} else {
|
1517
|
-
stack.push({
|
1518
|
-
node: substitutionNode,
|
1519
|
-
editsRemaining: frame.editsRemaining - 1,
|
1520
|
-
str: frame.str.slice(1)
|
1521
|
-
})
|
1522
|
-
}
|
1523
|
-
}
|
1524
|
-
|
1525
|
-
// insertion
|
1526
|
-
// can only do insertion if there are edits remaining
|
1527
|
-
if (frame.editsRemaining > 0) {
|
1528
|
-
if ("*" in frame.node.edges) {
|
1529
|
-
var insertionNode = frame.node.edges["*"]
|
1530
|
-
} else {
|
1531
|
-
var insertionNode = new lunr.TokenSet
|
1532
|
-
frame.node.edges["*"] = insertionNode
|
1533
1524
|
}
|
1534
1525
|
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
editsRemaining: frame.editsRemaining - 1,
|
1541
|
-
str: frame.str
|
1542
|
-
})
|
1543
|
-
}
|
1526
|
+
stack.push({
|
1527
|
+
node: substitutionNode,
|
1528
|
+
editsRemaining: frame.editsRemaining - 1,
|
1529
|
+
str: frame.str.slice(1)
|
1530
|
+
})
|
1544
1531
|
}
|
1545
1532
|
|
1546
1533
|
// transposition
|
1547
1534
|
// can only do a transposition if there are edits remaining
|
1548
1535
|
// and there are enough characters to transpose
|
1549
|
-
if (frame.
|
1536
|
+
if (frame.str.length > 1) {
|
1550
1537
|
var charA = frame.str.charAt(0),
|
1551
1538
|
charB = frame.str.charAt(1),
|
1552
1539
|
transposeNode
|
@@ -1560,13 +1547,13 @@ lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
|
|
1560
1547
|
|
1561
1548
|
if (frame.str.length == 1) {
|
1562
1549
|
transposeNode.final = true
|
1563
|
-
} else {
|
1564
|
-
stack.push({
|
1565
|
-
node: transposeNode,
|
1566
|
-
editsRemaining: frame.editsRemaining - 1,
|
1567
|
-
str: charA + frame.str.slice(2)
|
1568
|
-
})
|
1569
1550
|
}
|
1551
|
+
|
1552
|
+
stack.push({
|
1553
|
+
node: transposeNode,
|
1554
|
+
editsRemaining: frame.editsRemaining - 1,
|
1555
|
+
str: charA + frame.str.slice(2)
|
1556
|
+
})
|
1570
1557
|
}
|
1571
1558
|
}
|
1572
1559
|
|
@@ -1619,6 +1606,10 @@ lunr.TokenSet.fromString = function (str) {
|
|
1619
1606
|
* Converts this TokenSet into an array of strings
|
1620
1607
|
* contained within the TokenSet.
|
1621
1608
|
*
|
1609
|
+
* This is not intended to be used on a TokenSet that
|
1610
|
+
* contains wildcards, in these cases the results are
|
1611
|
+
* undefined and are likely to cause an infinite loop.
|
1612
|
+
*
|
1622
1613
|
* @returns {string[]}
|
1623
1614
|
*/
|
1624
1615
|
lunr.TokenSet.prototype.toArray = function () {
|
@@ -1836,7 +1827,7 @@ lunr.TokenSet.Builder.prototype.minimize = function (downTo) {
|
|
1836
1827
|
}
|
1837
1828
|
/*!
|
1838
1829
|
* lunr.Index
|
1839
|
-
* Copyright (C)
|
1830
|
+
* Copyright (C) 2020 Oliver Nightingale
|
1840
1831
|
*/
|
1841
1832
|
|
1842
1833
|
/**
|
@@ -2003,7 +1994,7 @@ lunr.Index.prototype.query = function (fn) {
|
|
2003
1994
|
*/
|
2004
1995
|
var clause = query.clauses[i],
|
2005
1996
|
terms = null,
|
2006
|
-
clauseMatches = lunr.Set.
|
1997
|
+
clauseMatches = lunr.Set.empty
|
2007
1998
|
|
2008
1999
|
if (clause.usePipeline) {
|
2009
2000
|
terms = this.pipeline.runString(clause.term, {
|
@@ -2328,7 +2319,7 @@ lunr.Index.load = function (serializedIndex) {
|
|
2328
2319
|
}
|
2329
2320
|
/*!
|
2330
2321
|
* lunr.Builder
|
2331
|
-
* Copyright (C)
|
2322
|
+
* Copyright (C) 2020 Oliver Nightingale
|
2332
2323
|
*/
|
2333
2324
|
|
2334
2325
|
/**
|