minimal-mistakes-jekyll 4.25.0 → 4.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,70 +1,7 @@
1
1
  {% if paginator.total_pages > 1 %}
2
- <nav class="pagination">
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 %}
5
- <ul>
6
- {% comment %} Link for previous page {% endcomment %}
7
- {% if paginator.previous_page %}
8
- {% if paginator.previous_page == 1 %}
9
- <li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
10
- {% else %}
11
- <li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
12
- {% endif %}
13
- {% else %}
14
- <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
15
- {% endif %}
16
-
17
- {% comment %} First page {% endcomment %}
18
- {% if paginator.page == 1 %}
19
- <li><a href="#" class="disabled current">1</a></li>
20
- {% else %}
21
- <li><a href="{{ first_page_path }}">1</a></li>
22
- {% endif %}
23
-
24
- {% assign page_start = 2 %}
25
- {% if paginator.page > 4 %}
26
- {% assign page_start = paginator.page | minus: 2 %}
27
- {% comment %} Ellipsis for truncated links {% endcomment %}
28
- <li><a href="#" class="disabled">&hellip;</a></li>
29
- {% endif %}
30
-
31
- {% assign page_end = paginator.total_pages | minus: 1 %}
32
- {% assign pages_to_end = paginator.total_pages | minus: paginator.page %}
33
- {% if pages_to_end > 4 %}
34
- {% assign page_end = paginator.page | plus: 2 %}
35
- {% endif %}
36
-
37
- {% for index in (page_start..page_end) %}
38
- {% if index == paginator.page %}
39
- <li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | relative_url }}" class="disabled current">{{ index }}</a></li>
40
- {% else %}
41
- {% comment %} Distance from current page and this link {% endcomment %}
42
- {% assign dist = paginator.page | minus: index %}
43
- {% if dist < 0 %}
44
- {% comment %} Distance must be a positive value {% endcomment %}
45
- {% assign dist = 0 | minus: dist %}
46
- {% endif %}
47
- <li><a href="{{ site.paginate_path | replace: ':num', index | relative_url }}">{{ index }}</a></li>
48
- {% endif %}
49
- {% endfor %}
50
-
51
- {% comment %} Ellipsis for truncated links {% endcomment %}
52
- {% if pages_to_end > 3 %}
53
- <li><a href="#" class="disabled">&hellip;</a></li>
54
- {% endif %}
55
-
56
- {% if paginator.page == paginator.total_pages %}
57
- <li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
58
- {% else %}
59
- <li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | relative_url }}">{{ paginator.total_pages }}</a></li>
60
- {% endif %}
61
-
62
- {% comment %} Link next page {% endcomment %}
63
- {% if paginator.next_page %}
64
- <li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | relative_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
65
- {% else %}
66
- <li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
67
- {% endif %}
68
- </ul>
69
- </nav>
2
+ {% if site.paginate %}
3
+ {% include paginator-v1.html %}
4
+ {% elsif site.pagination.enabled %}
5
+ {% include paginator-v2.html %}
6
+ {% endif %}
70
7
  {% endif %}
@@ -1,5 +1,4 @@
1
- {%- for post in site.categories[include.taxonomy] -%}
2
- {%- unless post.hidden -%}
3
- {% include archive-single.html %}
4
- {%- endunless -%}
1
+ {% assign posts = site.categories[include.taxonomy] | where_exp: "post", "post.hidden != true" %}
2
+ {%- for post in posts -%}
3
+ {% include archive-single.html %}
5
4
  {%- endfor -%}
@@ -1,5 +1,4 @@
1
- {%- for post in site.tags[include.taxonomy] -%}
2
- {%- unless post.hidden -%}
3
- {% include archive-single.html %}
4
- {%- endunless -%}
1
+ {% assign posts = site.tags[include.taxonomy] | where_exp: "post", "post.hidden != true" %}
2
+ {%- for post in posts -%}
3
+ {% include archive-single.html %}
5
4
  {%- endfor -%}
@@ -0,0 +1,37 @@
1
+ {% assign items_max = 0 %}
2
+ {% for item in include.taxonomies %}
3
+ {% if item[1].size > items_max %}
4
+ {% assign items_max = item[1].size %}
5
+ {% endif %}
6
+ {% endfor %}
7
+
8
+ <ul class="taxonomy__index">
9
+ {% for i in (1..items_max) reversed %}
10
+ {% for item in include.taxonomies %}
11
+ {% if item[1].size == i %}
12
+ <li>
13
+ <a href="#{{ item[0] | slugify }}">
14
+ <strong>{{ item[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
15
+ </a>
16
+ </li>
17
+ {% endif %}
18
+ {% endfor %}
19
+ {% endfor %}
20
+ </ul>
21
+
22
+ {% assign entries_layout = page.entries_layout | default: 'list' %}
23
+ {% for i in (1..items_max) reversed %}
24
+ {% for taxonomy in include.taxonomies %}
25
+ {% if taxonomy[1].size == i %}
26
+ <section id="{{ taxonomy[0] | slugify }}" class="taxonomy__section">
27
+ <h2 class="archive__subtitle">{{ taxonomy[0] }}</h2>
28
+ <div class="entries-{{ entries_layout }}">
29
+ {% for post in taxonomy.last %}
30
+ {% include archive-single.html type=entries_layout %}
31
+ {% endfor %}
32
+ </div>
33
+ <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
34
+ </section>
35
+ {% endif %}
36
+ {% endfor %}
37
+ {% endfor %}
@@ -0,0 +1,16 @@
1
+ <script type="application/ld+json">
2
+ {
3
+ "@context": "https://schema.org",
4
+ {% if site.social.type == "Organization" -%}
5
+ "@type": "Organization",
6
+ "url": {{ '/' | absolute_url | jsonify }}{% if site.og_image %},
7
+ "logo": {{ site_og_image | jsonify }}{% endif %}{% if site.social.links %},
8
+ "sameAs": {{ site.social.links | jsonify }}{% endif %}
9
+ {%- else -%}
10
+ "@type": "Person",
11
+ "name": {{ site.social.name | default: site.name | jsonify }},
12
+ "url": {{ '/' | absolute_url | jsonify }}{% if site.social.links %},
13
+ "sameAs": {{ site.social.links | jsonify }}{% endif %}
14
+ {%- endif %}
15
+ }
16
+ </script>
data/_includes/seo.html CHANGED
@@ -1,24 +1,13 @@
1
1
  <!-- begin _includes/seo.html -->
2
- {%- if site.url -%}
3
- {%- assign seo_url = site.url | append: site.baseurl -%}
4
- {%- endif -%}
5
- {%- assign seo_url = seo_url | default: site.github.url -%}
2
+ {%- assign title_separator = site.title_separator | default: '-' -%}
6
3
 
7
- {% assign title_separator = site.title_separator | default: '-' | replace: '|', '&#124;' %}
4
+ {%- assign page_title = page.title | default: site.title | replace: '|', '&#124;' -%}
5
+ {%- assign seo_title = page_title | append: " " | append: title_separator | append: " " | append: site.title | replace: '|', '&#124;' -%}
8
6
 
9
- {%- if page.title -%}
10
- {%- assign seo_title = page.title | append: " " | append: title_separator | append: " " | append: site.title -%}
11
- {%- endif -%}
7
+ {%- assign page_title = page_title | markdownify | strip_html | strip_newlines | escape_once -%}
8
+ {%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
12
9
 
13
- {%- if seo_title -%}
14
- {%- assign seo_title = seo_title | markdownify | strip_html | strip_newlines | escape_once -%}
15
- {%- endif -%}
16
-
17
- {% if page.canonical_url %}
18
- {%- assign canonical_url = page.canonical_url %}
19
- {% else %}
20
- {%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url %}
21
- {% endif %}
10
+ {%- assign canonical_url = page.canonical_url | default: page.url | replace: "/index.html", "/" | absolute_url %}
22
11
 
23
12
  {%- assign seo_description = page.description | default: page.excerpt | default: site.description -%}
24
13
  {%- if seo_description -%}
@@ -32,14 +21,9 @@
32
21
  {%- assign author_twitter = author.twitter | replace: "@", "" -%}
33
22
  {%- endif -%}
34
23
 
35
- {%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image | absolute_url -%}
36
- {%- assign page_large_image = page_large_image | escape -%}
37
-
38
- {%- assign page_teaser_image = page.header.teaser | default: site.og_image | absolute_url -%}
39
- {%- assign page_teaser_image = page_teaser_image | escape -%}
40
-
41
- {%- assign site_og_image = site.og_image | absolute_url -%}
42
- {%- assign site_og_image = site_og_image | escape -%}
24
+ {%- assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image | absolute_url | escape -%}
25
+ {%- assign page_teaser_image = page.header.teaser | default: site.og_image | absolute_url | escape -%}
26
+ {%- assign site_og_image = site.og_image | absolute_url | escape -%}
43
27
 
44
28
  {%- if page.date -%}
45
29
  {%- assign og_type = "article" -%}
@@ -47,7 +31,7 @@
47
31
  {%- assign og_type = "website" -%}
48
32
  {%- endif -%}
49
33
 
50
- <title>{{ seo_title | default: site.title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
34
+ <title>{{ seo_title }}{% if paginator %}{% unless paginator.page == 1 %} {{ title_separator }} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}{% endif %}</title>
51
35
  <meta name="description" content="{{ seo_description }}">
52
36
 
53
37
  {% if author.name %}
@@ -60,7 +44,7 @@
60
44
  <meta property="og:type" content="{{ og_type }}">
61
45
  <meta property="og:locale" content="{{ site.locale | replace: "-", "_" | default: "en_US" }}">
62
46
  <meta property="og:site_name" content="{{ site.title }}">
63
- <meta property="og:title" content="{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
47
+ <meta property="og:title" content="{{ page_title }}">
64
48
  <meta property="og:url" content="{{ canonical_url }}">
65
49
 
66
50
  {% if seo_description %}
@@ -75,7 +59,7 @@
75
59
 
76
60
  {% if site.twitter.username %}
77
61
  <meta name="twitter:site" content="@{{ site.twitter.username | replace: "@", "" }}">
78
- <meta name="twitter:title" content="{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
62
+ <meta name="twitter:title" content="{{ page_title }}">
79
63
  <meta name="twitter:description" content="{{ seo_description }}">
80
64
  <meta name="twitter:url" content="{{ canonical_url }}">
81
65
 
@@ -121,21 +105,9 @@
121
105
  <link rel="next" href="{{ paginator.next_page_path | absolute_url }}">
122
106
  {% endif %}
123
107
 
124
- <script type="application/ld+json">
125
- {
126
- "@context": "https://schema.org",
127
- {% if site.social.type == "Organization" %}
128
- "@type": "Organization",
129
- "url": {{ '/' | absolute_url | jsonify }}{% if site.og_image %},
130
- "logo": {{ site_og_image | jsonify }}{% endif %}
131
- {% else %}
132
- "@type": "Person",
133
- "name": {{ site.social.name | default: site.name | jsonify }},
134
- "url": {{ '/' | absolute_url |jsonify }}{% if site.social.links %},
135
- "sameAs": {{ site.social.links | jsonify }}{% endif %}
136
- {% endif %}
137
- }
138
- </script>
108
+ {% if page.url == '/' %}
109
+ {% include schema.html %}
110
+ {% endif %}
139
111
 
140
112
  {% if site.google_site_verification %}
141
113
  <meta name="google-site-verification" content="{{ site.google_site_verification }}" />
data/_includes/toc.html CHANGED
@@ -24,7 +24,7 @@
24
24
  OTHER DEALINGS IN THE SOFTWARE.
25
25
  {% endcomment %}
26
26
  {% comment %}
27
- Version 1.1.0
27
+ Version 1.2.1
28
28
  https://github.com/allejo/jekyll-toc
29
29
 
30
30
  "...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
@@ -47,6 +47,7 @@
47
47
  * base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
48
48
  * anchor_class (string) : '' - add custom class(es) for each anchor element
49
49
  * skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
50
+ * flat_toc (bool) : false - when set to true, the TOC will be a single level list
50
51
 
51
52
  Output:
52
53
  An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
@@ -69,6 +70,7 @@
69
70
 
70
71
  {% capture jekyll_toc %}{% endcapture %}
71
72
  {% assign orderedList = include.ordered | default: false %}
73
+ {% assign flatToc = include.flat_toc | default: false %}
72
74
  {% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
73
75
  {% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
74
76
  {% assign minHeader = include.h_min | default: 1 %}
@@ -138,9 +140,9 @@
138
140
  {% capture listItem %}{{ anchorBody }}{% endcapture %}
139
141
  {% endif %}
140
142
 
141
- {% if currLevel > lastLevel %}
143
+ {% if currLevel > lastLevel and flatToc == false %}
142
144
  {% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
143
- {% elsif currLevel < lastLevel %}
145
+ {% elsif currLevel < lastLevel and flatToc == false %}
144
146
  {% assign repeatCount = lastLevel | minus: currLevel %}
145
147
 
146
148
  {% for i in (1..repeatCount) %}
@@ -158,8 +160,13 @@
158
160
  {% assign firstHeader = false %}
159
161
  {% endfor %}
160
162
 
161
- {% assign repeatCount = minHeader | minus: 1 %}
162
- {% assign repeatCount = lastLevel | minus: repeatCount %}
163
+ {% if flatToc == true %}
164
+ {% assign repeatCount = 1 %}
165
+ {% else %}
166
+ {% assign repeatCount = minHeader | minus: 1 %}
167
+ {% assign repeatCount = lastLevel | minus: repeatCount %}
168
+ {% endif %}
169
+
163
170
  {% for i in (1..repeatCount) %}
164
171
  {% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
165
172
  {% endfor %}
@@ -179,4 +186,4 @@
179
186
  {% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
180
187
  {% endif %}
181
188
  {% endif %}
182
- {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc }}
189
+ {% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc -}}
@@ -23,4 +23,4 @@ layout: default
23
23
  {% endunless %}
24
24
  {{ content }}
25
25
  </div>
26
- </div>
26
+ </div>
@@ -4,40 +4,4 @@ layout: archive
4
4
 
5
5
  {{ content }}
6
6
 
7
- {% assign categories_max = 0 %}
8
- {% for category in site.categories %}
9
- {% if category[1].size > categories_max %}
10
- {% assign categories_max = category[1].size %}
11
- {% endif %}
12
- {% endfor %}
13
-
14
- <ul class="taxonomy__index">
15
- {% for i in (1..categories_max) reversed %}
16
- {% for category in site.categories %}
17
- {% if category[1].size == i %}
18
- <li>
19
- <a href="#{{ category[0] | slugify }}">
20
- <strong>{{ category[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
21
- </a>
22
- </li>
23
- {% endif %}
24
- {% endfor %}
25
- {% endfor %}
26
- </ul>
27
-
28
- {% assign entries_layout = page.entries_layout | default: 'list' %}
29
- {% for i in (1..categories_max) reversed %}
30
- {% for category in site.categories %}
31
- {% if category[1].size == i %}
32
- <section id="{{ category[0] | slugify }}" class="taxonomy__section">
33
- <h2 class="archive__subtitle">{{ category[0] }}</h2>
34
- <div class="entries-{{ entries_layout }}">
35
- {% for post in category.last %}
36
- {% include archive-single.html type=entries_layout %}
37
- {% endfor %}
38
- </div>
39
- <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
40
- </section>
41
- {% endif %}
42
- {% endfor %}
43
- {% endfor %}
7
+ {% include posts-taxonomy.html taxonomies=site.categories %}
@@ -15,6 +15,7 @@
15
15
 
16
16
  <div class="initial-content">
17
17
  {{ content }}
18
+ {% include after-content.html %}
18
19
  </div>
19
20
 
20
21
  {% if site.search == true %}
@@ -31,6 +32,5 @@
31
32
  </div>
32
33
 
33
34
  {% include scripts.html %}
34
-
35
35
  </body>
36
36
  </html>
data/_layouts/single.html CHANGED
@@ -21,8 +21,8 @@ layout: default
21
21
  <div id="main" role="main">
22
22
  {% include sidebar.html %}
23
23
 
24
- <article class="page h-entry" itemscope itemtype="https://schema.org/CreativeWork">
25
- {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
24
+ <article class="page" itemscope itemtype="https://schema.org/CreativeWork">
25
+ {% if page.title %}<meta itemprop="headline" content="{{ page.title | replace: '|', '&#124;' | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
26
26
  {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
27
27
  {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
28
28
  {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %}
@@ -30,14 +30,16 @@ layout: default
30
30
  <div class="page__inner-wrap">
31
31
  {% unless page.header.overlay_color or page.header.overlay_image %}
32
32
  <header>
33
- {% if page.title %}<h1 id="page-title" class="page__title p-name" itemprop="headline">
34
- <a href="{{ page.url | absolute_url }}" class="u-url" itemprop="url">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</a>
35
- </h1>{% endif %}
33
+ {% if page.title -%}
34
+ <h1 id="page-title" class="page__title" itemprop="headline">
35
+ <a href="{{ page.url | absolute_url }}" itemprop="url">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</a>
36
+ </h1>
37
+ {%- endif %}
36
38
  {% include page__meta.html %}
37
39
  </header>
38
40
  {% endunless %}
39
41
 
40
- <section class="page__content e-content" itemprop="text">
42
+ <section class="page__content" itemprop="text">
41
43
  {% if page.toc %}
42
44
  <aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
43
45
  <nav class="toc">
@@ -70,26 +72,9 @@ layout: default
70
72
 
71
73
  {% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
72
74
  {% if page.id and page.related and site.related_posts.size > 0 %}
73
- <div class="page__related">
74
- <h2 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h2>
75
- <div class="grid__wrapper">
76
- {% for post in site.related_posts limit:4 %}
77
- {% include archive-single.html type="grid" %}
78
- {% endfor %}
79
- </div>
80
- </div>
75
+ {% include page__related.html posts=site.related_posts %}
81
76
  {% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
82
77
  {% elsif page.id and page.related %}
83
- <div class="page__related">
84
- <h2 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h2>
85
- <div class="grid__wrapper">
86
- {% for post in site.posts limit:4 %}
87
- {% if post.id == page.id %}
88
- {% continue %}
89
- {% endif %}
90
- {% include archive-single.html type="grid" %}
91
- {% endfor %}
92
- </div>
93
- </div>
78
+ {% include page__related.html posts=site.posts %}
94
79
  {% endif %}
95
80
  </div>
data/_layouts/tags.html CHANGED
@@ -4,40 +4,4 @@ layout: archive
4
4
 
5
5
  {{ content }}
6
6
 
7
- {% assign tags_max = 0 %}
8
- {% for tag in site.tags %}
9
- {% if tag[1].size > tags_max %}
10
- {% assign tags_max = tag[1].size %}
11
- {% endif %}
12
- {% endfor %}
13
-
14
- <ul class="taxonomy__index">
15
- {% for i in (1..tags_max) reversed %}
16
- {% for tag in site.tags %}
17
- {% if tag[1].size == i %}
18
- <li>
19
- <a href="#{{ tag[0] | slugify }}">
20
- <strong>{{ tag[0] }}</strong> <span class="taxonomy__count">{{ i }}</span>
21
- </a>
22
- </li>
23
- {% endif %}
24
- {% endfor %}
25
- {% endfor %}
26
- </ul>
27
-
28
- {% assign entries_layout = page.entries_layout | default: 'list' %}
29
- {% for i in (1..tags_max) reversed %}
30
- {% for tag in site.tags %}
31
- {% if tag[1].size == i %}
32
- <section id="{{ tag[0] | slugify | downcase }}" class="taxonomy__section">
33
- <h2 class="archive__subtitle">{{ tag[0] }}</h2>
34
- <div class="entries-{{ entries_layout }}">
35
- {% for post in tag.last %}
36
- {% include archive-single.html type=entries_layout %}
37
- {% endfor %}
38
- </div>
39
- <a href="#page-title" class="back-to-top">{{ site.data.ui-text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
40
- </section>
41
- {% endif %}
42
- {% endfor %}
43
- {% endfor %}
7
+ {% include posts-taxonomy.html taxonomies=site.tags %}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Minimal Mistakes Jekyll Theme 4.25.0 by Michael Rose
2
+ * Minimal Mistakes Jekyll Theme 4.26.0 by Michael Rose
3
3
  * Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
4
4
  * Free for personal and commercial use under the MIT license
5
5
  * https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
@@ -591,3 +591,60 @@ a.reversefootnote {
591
591
  position: static;
592
592
  }
593
593
  }
594
+
595
+ /*
596
+ Copy <pre> block to clipboard
597
+ ========================================================================== */
598
+
599
+ // a <textarea> to hold text for document.execCommand("copy")
600
+ .clipboard-helper {
601
+ // Prevent zooming on iOS
602
+ font-size: 12pt !important;
603
+ border: 0 !important;
604
+ padding: 0 !important;
605
+ margin: 0 !important;
606
+ outline: none !important;
607
+ position: absolute;
608
+ }
609
+
610
+ pre {
611
+ .clipboard-copy-button {
612
+ display: block;
613
+ position: absolute;
614
+ top: 0.6em;
615
+ right: 0.5em;
616
+ z-index: 1;
617
+ background: none;
618
+ border: none;
619
+ outline: none;
620
+ border-radius: 0.1em;
621
+ padding: 0.2em 0.5em;
622
+ color: white;
623
+ opacity: 0.4;
624
+ transition: color 0.25s linear -0.25s, opacity 0.25s linear;
625
+
626
+ &:hover {
627
+ color: #ffffca;
628
+ }
629
+
630
+ &::before {
631
+ content: '';
632
+ position: absolute;
633
+ top: 0;
634
+ right: 0;
635
+ bottom: 0;
636
+ left: 0;
637
+ z-index: 2;
638
+ }
639
+
640
+ @at-root {
641
+ .no-copy & {
642
+ display: none;
643
+ }
644
+ }
645
+ }
646
+
647
+ &:hover .clipboard-copy-button {
648
+ opacity: 1;
649
+ }
650
+ }