minimal-mistakes-jekyll 4.24.0 → 4.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +324 -243
  3. data/README.md +27 -19
  4. data/_data/ui-text.yml +149 -39
  5. data/_includes/after-content.html +0 -0
  6. data/_includes/author-profile-custom-links.html +1 -1
  7. data/_includes/author-profile.html +36 -42
  8. data/_includes/before-related.html +0 -0
  9. data/_includes/breadcrumbs.html +3 -2
  10. data/_includes/category-list.html +1 -1
  11. data/_includes/comments-providers/giscus.html +11 -1
  12. data/_includes/comments-providers/utterances.html +1 -0
  13. data/_includes/comments.html +30 -12
  14. data/_includes/copyright.html +6 -0
  15. data/_includes/copyright.js +6 -0
  16. data/_includes/footer.html +1 -1
  17. data/_includes/head.html +3 -3
  18. data/_includes/page__date.html +3 -3
  19. data/_includes/page__related.html +15 -0
  20. data/_includes/paginator.html +2 -1
  21. data/_includes/search/algolia-search-scripts.html +72 -51
  22. data/_includes/search/search_form.html +2 -2
  23. data/_includes/social-share.html +1 -1
  24. data/_includes/tag-list.html +1 -1
  25. data/_includes/toc.html +13 -6
  26. data/_includes/video +1 -1
  27. data/_layouts/categories.html +1 -1
  28. data/_layouts/default.html +2 -8
  29. data/_layouts/single.html +12 -23
  30. data/_sass/minimal-mistakes/_base.scss +0 -18
  31. data/_sass/minimal-mistakes/_copyright.scss +6 -0
  32. data/_sass/minimal-mistakes/_navigation.scss +2 -2
  33. data/_sass/minimal-mistakes/_notices.scss +4 -0
  34. data/_sass/minimal-mistakes/_page.scss +19 -0
  35. data/_sass/minimal-mistakes/_sidebar.scss +7 -0
  36. data/_sass/minimal-mistakes.scss +2 -5
  37. data/assets/css/main.scss +1 -0
  38. data/assets/js/_main.js +7 -7
  39. data/assets/js/lunr/lunr-store.js +36 -1
  40. data/assets/js/main.min.js +5 -4
  41. data/assets/js/plugins/jquery.greedy-navigation.js +2 -2
  42. data/assets/js/vendor/jquery/{jquery-3.5.1.js → jquery-3.6.0.js} +118 -109
  43. metadata +11 -5
  44. data/_includes/browser-upgrade.html +0 -3
@@ -1,28 +1,22 @@
1
1
  {% assign author = page.author | default: page.authors[0] | default: site.author %}
2
2
  {% assign author = site.data.authors[author] | default: author %}
3
3
 
4
- <div itemscope itemtype="https://schema.org/Person">
4
+ <div itemscope itemtype="https://schema.org/Person" class="h-card">
5
5
 
6
6
  {% if author.avatar %}
7
7
  <div class="author__avatar">
8
- {% if author.home %}
9
- <a href="{{ author.home | relative_url }}">
10
- <img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image">
11
- </a>
12
- {% else %}
13
- <img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image">
14
- {% endif %}
8
+ <a href="{{ author.home | default: '/' | absolute_url }}">
9
+ <img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image" class="u-photo">
10
+ </a>
15
11
  </div>
16
12
  {% endif %}
17
13
 
18
14
  <div class="author__content">
19
- {% if author.home %}
20
- <a href="{{ author.home | relative_url }}"><h3 class="author__name" itemprop="name">{{ author.name }}</h3></a>
21
- {% else %}
22
- <h3 class="author__name" itemprop="name">{{ author.name }}</h3>
23
- {% endif %}
15
+ <h3 class="author__name p-name" itemprop="name">
16
+ <a class="u-url" rel="me" href="{{ author.home | default: '/' | absolute_url }}" itemprop="url">{{ author.name }}</a>
17
+ </h3>
24
18
  {% if author.bio %}
25
- <div class="author__bio" itemprop="description">
19
+ <div class="author__bio p-note" itemprop="description">
26
20
  {{ author.bio | markdownify }}
27
21
  </div>
28
22
  {% endif %}
@@ -33,21 +27,21 @@
33
27
  <ul class="author__urls social-icons">
34
28
  {% if author.location %}
35
29
  <li itemprop="homeLocation" itemscope itemtype="https://schema.org/Place">
36
- <i class="fas fa-fw fa-map-marker-alt" aria-hidden="true"></i> <span itemprop="name">{{ author.location }}</span>
30
+ <i class="fas fa-fw fa-map-marker-alt" aria-hidden="true"></i> <span itemprop="name" class="p-locality">{{ author.location }}</span>
37
31
  </li>
38
32
  {% endif %}
39
33
 
40
34
  {% if author.links %}
41
35
  {% for link in author.links %}
42
36
  {% if link.label and link.url %}
43
- <li><a href="{{ link.url }}" rel="nofollow noopener noreferrer"><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
37
+ <li><a href="{{ link.url }}" rel="nofollow noopener noreferrer me"{% if link.url contains 'http' %} itemprop="sameAs"{% endif %}><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
44
38
  {% endif %}
45
39
  {% endfor %}
46
40
  {% endif %}
47
41
 
48
42
  {% if author.uri %}
49
43
  <li>
50
- <a href="{{ author.uri }}" itemprop="url">
44
+ <a href="{{ author.uri }}" itemprop="url" rel="me">
51
45
  <i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</span>
52
46
  </a>
53
47
  </li>
@@ -55,7 +49,7 @@
55
49
 
56
50
  {% if author.email %}
57
51
  <li>
58
- <a href="mailto:{{ author.email }}">
52
+ <a href="mailto:{{ author.email }}" rel="me" class="u-email">
59
53
  <meta itemprop="email" content="{{ author.email }}" />
60
54
  <i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
61
55
  </a>
@@ -64,15 +58,15 @@
64
58
 
65
59
  {% if author.keybase %}
66
60
  <li>
67
- <a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
68
- <i class="fas fa-fw fa-key" aria-hidden="true"></i><span class="label">Keybase</span>
61
+ <a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
62
+ <i class="fab fa-fw fa-keybase" aria-hidden="true"></i><span class="label">Keybase</span>
69
63
  </a>
70
64
  </li>
71
65
  {% endif %}
72
66
 
73
67
  {% if author.twitter %}
74
68
  <li>
75
- <a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
69
+ <a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
76
70
  <i class="fab fa-fw fa-twitter-square" aria-hidden="true"></i><span class="label">Twitter</span>
77
71
  </a>
78
72
  </li>
@@ -80,7 +74,7 @@
80
74
 
81
75
  {% if author.facebook %}
82
76
  <li>
83
- <a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
77
+ <a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
84
78
  <i class="fab fa-fw fa-facebook-square" aria-hidden="true"></i><span class="label">Facebook</span>
85
79
  </a>
86
80
  </li>
@@ -88,7 +82,7 @@
88
82
 
89
83
  {% if author.linkedin %}
90
84
  <li>
91
- <a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
85
+ <a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
92
86
  <i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span class="label">LinkedIn</span>
93
87
  </a>
94
88
  </li>
@@ -96,7 +90,7 @@
96
90
 
97
91
  {% if author.xing %}
98
92
  <li>
99
- <a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
93
+ <a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
100
94
  <i class="fab fa-fw fa-xing-square" aria-hidden="true"></i><span class="label">XING</span>
101
95
  </a>
102
96
  </li>
@@ -104,7 +98,7 @@
104
98
 
105
99
  {% if author.instagram %}
106
100
  <li>
107
- <a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
101
+ <a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
108
102
  <i class="fab fa-fw fa-instagram" aria-hidden="true"></i><span class="label">Instagram</span>
109
103
  </a>
110
104
  </li>
@@ -112,7 +106,7 @@
112
106
 
113
107
  {% if author.tumblr %}
114
108
  <li>
115
- <a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer">
109
+ <a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer me">
116
110
  <i class="fab fa-fw fa-tumblr-square" aria-hidden="true"></i><span class="label">Tumblr</span>
117
111
  </a>
118
112
  </li>
@@ -120,7 +114,7 @@
120
114
 
121
115
  {% if author.bitbucket %}
122
116
  <li>
123
- <a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
117
+ <a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
124
118
  <i class="fab fa-fw fa-bitbucket" aria-hidden="true"></i><span class="label">Bitbucket</span>
125
119
  </a>
126
120
  </li>
@@ -128,7 +122,7 @@
128
122
 
129
123
  {% if author.github %}
130
124
  <li>
131
- <a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
125
+ <a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
132
126
  <i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">GitHub</span>
133
127
  </a>
134
128
  </li>
@@ -136,7 +130,7 @@
136
130
 
137
131
  {% if author.gitlab %}
138
132
  <li>
139
- <a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
133
+ <a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
140
134
  <i class="fab fa-fw fa-gitlab" aria-hidden="true"></i><span class="label">GitLab</span>
141
135
  </a>
142
136
  </li>
@@ -144,7 +138,7 @@
144
138
 
145
139
  {% if author.stackoverflow %}
146
140
  <li>
147
- <a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
141
+ <a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
148
142
  <i class="fab fa-fw fa-stack-overflow" aria-hidden="true"></i><span class="label">Stack Overflow</span>
149
143
  </a>
150
144
  </li>
@@ -152,7 +146,7 @@
152
146
 
153
147
  {% if author.lastfm %}
154
148
  <li>
155
- <a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
149
+ <a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
156
150
  <i class="fab fa-fw fa-lastfm-square" aria-hidden="true"></i><span class="label">Last.fm</span>
157
151
  </a>
158
152
  </li>
@@ -160,7 +154,7 @@
160
154
 
161
155
  {% if author.dribbble %}
162
156
  <li>
163
- <a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
157
+ <a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
164
158
  <i class="fab fa-fw fa-dribbble" aria-hidden="true"></i><span class="label">Dribbble</span>
165
159
  </a>
166
160
  </li>
@@ -168,7 +162,7 @@
168
162
 
169
163
  {% if author.pinterest %}
170
164
  <li>
171
- <a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
165
+ <a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
172
166
  <i class="fab fa-fw fa-pinterest" aria-hidden="true"></i><span class="label">Pinterest</span>
173
167
  </a>
174
168
  </li>
@@ -176,7 +170,7 @@
176
170
 
177
171
  {% if author.foursquare %}
178
172
  <li>
179
- <a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
173
+ <a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
180
174
  <i class="fab fa-fw fa-foursquare" aria-hidden="true"></i><span class="label">Foursquare</span>
181
175
  </a>
182
176
  </li>
@@ -184,7 +178,7 @@
184
178
 
185
179
  {% if author.steam %}
186
180
  <li>
187
- <a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
181
+ <a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
188
182
  <i class="fab fa-fw fa-steam" aria-hidden="true"></i><span class="label">Steam</span>
189
183
  </a>
190
184
  </li>
@@ -193,13 +187,13 @@
193
187
  {% if author.youtube %}
194
188
  {% if author.youtube contains "://" %}
195
189
  <li>
196
- <a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
190
+ <a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
197
191
  <i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
198
192
  </a>
199
193
  </li>
200
194
  {% elsif author.youtube %}
201
195
  <li>
202
- <a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
196
+ <a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
203
197
  <i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
204
198
  </a>
205
199
  </li>
@@ -208,7 +202,7 @@
208
202
 
209
203
  {% if author.soundcloud %}
210
204
  <li>
211
- <a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
205
+ <a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
212
206
  <i class="fab fa-fw fa-soundcloud" aria-hidden="true"></i><span class="label">SoundCloud</span>
213
207
  </a>
214
208
  </li>
@@ -216,7 +210,7 @@
216
210
 
217
211
  {% if author.weibo %}
218
212
  <li>
219
- <a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
213
+ <a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
220
214
  <i class="fab fa-fw fa-weibo" aria-hidden="true"></i><span class="label">Weibo</span>
221
215
  </a>
222
216
  </li>
@@ -224,7 +218,7 @@
224
218
 
225
219
  {% if author.flickr %}
226
220
  <li>
227
- <a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
221
+ <a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
228
222
  <i class="fab fa-fw fa-flickr" aria-hidden="true"></i><span class="label">Flickr</span>
229
223
  </a>
230
224
  </li>
@@ -232,7 +226,7 @@
232
226
 
233
227
  {% if author.codepen %}
234
228
  <li>
235
- <a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
229
+ <a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
236
230
  <i class="fab fa-fw fa-codepen" aria-hidden="true"></i><span class="label">CodePen</span>
237
231
  </a>
238
232
  </li>
@@ -240,7 +234,7 @@
240
234
 
241
235
  {% if author.vine %}
242
236
  <li>
243
- <a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer">
237
+ <a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
244
238
  <i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
245
239
  </a>
246
240
  </li>
File without changes
@@ -19,7 +19,8 @@
19
19
  {% for crumb in crumbs offset: 1 %}
20
20
  {% if forloop.first %}
21
21
  <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
22
- <a href="{{ site.url }}{{ site.baseurl }}/" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
22
+ <a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
23
+
23
24
  <meta itemprop="position" content="{{ i }}" />
24
25
  </li>
25
26
  <span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
@@ -29,7 +30,7 @@
29
30
  {% else %}
30
31
  {% assign i = i | plus: 1 %}
31
32
  <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
32
- <a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
33
+ <a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | url_decode | replace: '-', ' ' | capitalize }}</span></a>
33
34
  <meta itemprop="position" content="{{ i }}" />
34
35
  </li>
35
36
  <span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
@@ -12,7 +12,7 @@
12
12
  <strong><i class="fas fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
13
13
  <span itemprop="keywords">
14
14
  {% for category_word in categories_sorted %}
15
- <a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | relative_url }}" class="page__taxonomy-item" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
15
+ <a href="{{ category_word | slugify | prepend: path_type | prepend: site.category_archive.path | relative_url }}" class="page__taxonomy-item p-category" rel="tag">{{ category_word }}</a>{% unless forloop.last %}<span class="sep">, </span>{% endunless %}
16
16
  {% endfor %}
17
17
  </span>
18
18
  </p>
@@ -9,16 +9,26 @@
9
9
  }
10
10
 
11
11
  var script = document.createElement('script');
12
+
12
13
  script.setAttribute('src', 'https://giscus.app/client.js');
13
14
  script.setAttribute('data-repo', '{{ site.repository | downcase }}');
14
15
  script.setAttribute('data-repo-id', '{{ site.comments.giscus.repo_id }}');
15
16
  script.setAttribute('data-category', '{{ site.comments.giscus.category_name }}');
16
17
  script.setAttribute('data-category-id', '{{ site.comments.giscus.category_id }}');
17
18
  script.setAttribute('data-mapping', '{{ site.comments.giscus.discussion_term | default: "pathname" }}');
19
+ script.setAttribute('data-strict', '{{ site.comments.giscus.strict | default: 0 }}');
18
20
  script.setAttribute('data-reactions-enabled', '{{ site.comments.giscus.reactions_enabled | default: 1 }}');
21
+ script.setAttribute('data-emit-metadata', '{{ site.comments.giscus.emit_metadata | default: 0 }}');
22
+ script.setAttribute('data-input-position', '{{ site.comments.giscus.input_position | default: "top" }}');
19
23
  script.setAttribute('data-theme', '{{ site.comments.giscus.theme | default: "light" }}');
24
+ script.setAttribute('data-lang', '{{ site.comments.giscus.lang | default: "en" }}');
25
+ {% if site.comments.giscus.lazy %}
26
+ script.setAttribute('data-loading', 'lazy');
27
+ {% endif %}
20
28
  script.setAttribute('crossorigin', 'anonymous');
21
29
 
30
+ script.setAttribute('async', '');
31
+
22
32
  commentContainer.appendChild(script);
23
33
  })();
24
- </script>
34
+ </script>
@@ -12,6 +12,7 @@
12
12
  script.setAttribute('src', 'https://utteranc.es/client.js');
13
13
  script.setAttribute('repo', '{{ site.repository }}');
14
14
  script.setAttribute('issue-term', '{{ site.comments.utterances.issue_term | default: "pathname" }}');
15
+ {% if site.comments.utterances.label %}script.setAttribute('label', '{{ site.comments.utterances.label }}');{% endif %}
15
16
  script.setAttribute('theme', '{{ site.comments.utterances.theme | default: "github-light" }}');
16
17
  script.setAttribute('crossorigin', 'anonymous');
17
18
 
@@ -17,14 +17,23 @@
17
17
  <div class="js-comments">
18
18
  {% if site.data.comments[page.slug] %}
19
19
  <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
20
- {% assign comments = site.data.comments[page.slug] | sort %}
20
+ {% assign comments = site.data.comments[page.slug] %}
21
21
 
22
+ <!-- In order to sort by date we must have an array of objects, not an array of arrays, so
23
+ create a new array of plain comment objects and then sort by the comment date. -->
24
+ {% assign commentObjects = '' | split: '' %}
22
25
  {% for comment in comments %}
23
- {% assign email = comment[1].email %}
24
- {% assign name = comment[1].name %}
25
- {% assign url = comment[1].url %}
26
- {% assign date = comment[1].date %}
27
- {% assign message = comment[1].message %}
26
+ {% assign commentObject = comment[1] %}
27
+ {% assign commentObjects = commentObjects | push: commentObject %}
28
+ {% endfor %}
29
+ {% assign comments = commentObjects | sort: "date" %}
30
+
31
+ {% for comment in comments %}
32
+ {% assign email = comment.email %}
33
+ {% assign name = comment.name %}
34
+ {% assign url = comment.url %}
35
+ {% assign date = comment.date %}
36
+ {% assign message = comment.message %}
28
37
  {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
29
38
  {% endfor %}
30
39
  {% endif %}
@@ -91,14 +100,23 @@
91
100
  <div class="js-comments">
92
101
  {% if site.data.comments[page.slug] %}
93
102
  <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
94
- {% assign comments = site.data.comments[page.slug] | sort %}
103
+ {% assign comments = site.data.comments[page.slug] %}
104
+
105
+ <!-- In order to sort by date we must have an array of objects, not an array of arrays, so
106
+ create a new array of plain comment objects and then sort by the comment date. -->
107
+ {% assign commentObjects = '' | split: '' %}
108
+ {% for comment in comments %}
109
+ {% assign commentObject = comment[1] %}
110
+ {% assign commentObjects = commentObjects | push: commentObject %}
111
+ {% endfor %}
112
+ {% assign comments = commentObjects | sort: "date" %}
95
113
 
96
114
  {% for comment in comments %}
97
- {% assign email = comment[1].email %}
98
- {% assign name = comment[1].name %}
99
- {% assign url = comment[1].url %}
100
- {% assign date = comment[1].date %}
101
- {% assign message = comment[1].message %}
115
+ {% assign email = comment.email %}
116
+ {% assign name = comment.name %}
117
+ {% assign url = comment.url %}
118
+ {% assign date = comment.date %}
119
+ {% assign message = comment.message %}
102
120
  {% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
103
121
  {% endfor %}
104
122
  {% endif %}
@@ -0,0 +1,6 @@
1
+ <!--
2
+ Minimal Mistakes Jekyll Theme 4.25.1 by Michael Rose
3
+ Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
4
+ Free for personal and commercial use under the MIT license
5
+ https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
6
+ -->
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Minimal Mistakes Jekyll Theme 4.25.1 by Michael Rose
3
+ * Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
4
+ * Free for personal and commercial use under the MIT license
5
+ * https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
6
+ */
@@ -18,4 +18,4 @@
18
18
  </ul>
19
19
  </div>
20
20
 
21
- <div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
21
+ <div class="page__footer-copyright">&copy; {{ site.time | date: '%Y' }} <a href="{{ site.copyright_url | default: site.url }}">{{ site.copyright | default: site.title }}</a>. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
data/_includes/head.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | relative_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
7
7
  {% endunless %}
8
8
 
9
- <!-- https://t.co/dKP3o1e -->
9
+ {%- comment %} https://docs.google.com/presentation/d/1rmxwWa9P6_xHqonmh5ONXRS-jPc5XKbnv99Rjkhe04s/present {% endcomment -%}
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
 
12
12
  <script>
@@ -15,8 +15,8 @@
15
15
 
16
16
  <!-- For all browsers -->
17
17
  <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
18
- <link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
19
- <noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>
18
+ <link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@latest/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
19
+ <noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@latest/css/all.min.css"></noscript>
20
20
 
21
21
  {% if site.head_scripts %}
22
22
  {% for script in site.head_scripts %}
@@ -1,6 +1,6 @@
1
1
  {% assign date_format = site.date_format | default: "%B %-d, %Y" %}
2
2
  {% if page.last_modified_at %}
3
- <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>
3
+ <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time class="dt-published" datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>
4
4
  {% elsif page.date %}
5
- <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></p>
6
- {% endif %}
5
+ <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></p>
6
+ {% endif %}
@@ -0,0 +1,15 @@
1
+ <div class="page__related">
2
+ {% include before-related.html %}
3
+ <h2 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h2>
4
+ <div class="grid__wrapper">
5
+ {% assign count = 0 %}
6
+ {% assign limit = include.limit | default: 4 %}
7
+ {% for post in include.posts %}
8
+ {% if post.hidden %}{% continue %}{% endif %}
9
+ {% if post.id == page.id %}{% continue %}{% endif %}
10
+ {% if count >= limit %}{% break %}{% endif %}
11
+ {% assign count = count | plus: 1 %}
12
+ {% include archive-single.html type="grid" %}
13
+ {% endfor %}
14
+ </div>
15
+ </div>
@@ -1,6 +1,7 @@
1
1
  {% if paginator.total_pages > 1 %}
2
2
  <nav class="pagination">
3
- {% assign first_page_path = paginator.first_page_path | default: site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | relative_url %}
3
+ {% assign paginate_path_last = site.paginate_path | split: '/' | last %}
4
+ {% assign first_page_path = paginator.first_page_path | default: site.paginate_path | replace: paginate_path_last, '' | replace: '//', '/' | relative_url %}
4
5
  <ul>
5
6
  {% comment %} Link for previous page {% endcomment %}
6
7
  {% if paginator.previous_page %}
@@ -1,60 +1,81 @@
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" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch.min.css">
4
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch-theme-algolia.min.css">
5
-
6
1
  <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
- });
2
+ // Including InstantSearch.js library and styling
3
+ const loadSearch = function() {
4
+ const loadCSS = function(src) {
5
+ var link = document.createElement('link');
6
+ link.rel = 'stylesheet';
7
+ link.type = 'text/css';
8
+ link.href = src;
9
+ link.media = 'all';
10
+ document.head.appendChild(link);
11
+ };
12
+
13
+ var script = document.createElement('script');
14
+ script.setAttribute("type", "text/javascript");
15
+ script.setAttribute("src", "https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch.min.js");
16
+ script.addEventListener("load", function() {
17
+ // Instantiating InstantSearch.js with Algolia credentials
18
+ const search = instantsearch({
19
+ appId: '{{ site.algolia.application_id }}',
20
+ apiKey: '{{ site.algolia.search_only_api_key }}',
21
+ indexName: '{{ site.algolia.index_name }}',
22
+ searchParameters: {
23
+ restrictSearchableAttributes: ['title', 'content']
24
+ }
25
+ });
26
+
27
+ const hitTemplate = function(hit) {
28
+ const url = hit.url;
29
+ const hightlight = hit._highlightResult;
30
+ const title = hightlight.title && hightlight.title.value || "";
31
+ const content = hightlight.html && hightlight.html.value || "";
32
+
33
+ return `
34
+ <div class="list__item">
35
+ <article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
36
+ <h2 class="archive__item-title" itemprop="headline"><a href="{{ site.baseurl }}${url}">${title}</a></h2>
37
+ <div class="archive__item-excerpt" itemprop="description">${content}</div>
38
+ </article>
39
+ </div>
40
+ `;
41
+ }
19
42
 
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="https://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
- empty: '{{ site.data.ui-text[site.locale].search_algolia_no_results | default: "No results" }}',
43
+ // Adding searchbar and results widgets
44
+ search.addWidget(
45
+ instantsearch.widgets.searchBox({
46
+ container: '.search-searchbar',
47
+ {% unless site.algolia.powered_by == false %}poweredBy: true,{% endunless %}
48
+ placeholder: '{{ site.data.ui-text[site.locale].search_placeholder_text | default: "Enter your search term..." }}'
49
+ })
50
+ );
51
+ search.addWidget(
52
+ instantsearch.widgets.hits({
53
+ container: '.search-hits',
54
+ templates: {
55
+ item: hitTemplate,
56
+ empty: '{{ site.data.ui-text[site.locale].search_algolia_no_results | default: "No results" }}',
57
+ }
58
+ })
59
+ );
60
+
61
+ if (!search.started) {
62
+ search.start();
49
63
  }
50
- })
51
- );
64
+ });
65
+ document.body.appendChild(script);
66
+
67
+ loadCSS("https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch.min.css");
68
+ loadCSS("https://cdn.jsdelivr.net/npm/instantsearch.js@2.3.3/dist/instantsearch-theme-algolia.min.css");
69
+ };
52
70
 
53
71
  // Starting the search only when toggle is clicked
54
- $(document).ready(function () {
72
+ $(document).ready(function() {
73
+ var scriptLoaded = false;
74
+
55
75
  $(".search__toggle").on("click", function() {
56
- if(!search.started) {
57
- search.start();
76
+ if (!scriptLoaded) {
77
+ loadSearch();
78
+ scriptLoaded = true;
58
79
  }
59
80
  });
60
81
  });