Skip to content

Commit 3a7e438

Browse files
committed
Merge branch 'release/4.2.1'
2 parents 7cbf67c + 93778ff commit 3a7e438

12 files changed

+63
-31
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [4.2.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.1)
2+
3+
### Enhancements
4+
5+
- Improve `paginator.html` to support paginated pages that live inside of a subfolder. See [documentation](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#home-page) for more details. [#764](https://github.com/mmistakes/minimal-mistakes/pull/764/)
6+
7+
### Maintenance
8+
9+
- Add `https` protocol to Google Universal Analytics embed. [#772](https://github.com/mmistakes/minimal-mistakes/pull/772)
10+
111
## [4.2.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.0)
212

313
### Enhancements

_includes/analytics-providers/google-universal.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
44
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
5+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
66

77
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
88
ga('send', 'pageview');
9-
</script>
9+
</script>

_includes/page__hero.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{% if page.header.overlay_color or page.header.overlay_image %}
2929
<div class="wrapper">
3030
<h1 class="page__title" itemprop="headline">
31-
{% if paginator %}
31+
{% if paginator and site.paginate_show_page_num %}
3232
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
3333
{% else %}
3434
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
@@ -50,4 +50,4 @@ <h1 class="page__title" itemprop="headline">
5050
{% if page.header.caption %}
5151
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
5252
{% endif %}
53-
</div>
53+
</div>

_includes/paginator.html

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{% if paginator.total_pages > 1 %}
22
<nav class="pagination">
3+
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
34
<ul>
45
{% comment %} Link for previous page {% endcomment %}
56
{% if paginator.previous_page %}
67
{% if paginator.previous_page == 1 %}
7-
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
8+
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
89
{% else %}
9-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
10+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
1011
{% endif %}
1112
{% else %}
12-
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
13+
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
1314
{% endif %}
1415

1516
{% comment %} First page {% endcomment %}
1617
{% if paginator.page == 1 %}
1718
<li><a href="#" class="disabled current">1</a></li>
1819
{% else %}
19-
<li><a href="{{ '/' | absolute_url }}">1</a></li>
20+
<li><a href="{{ first_page_path }}">1</a></li>
2021
{% endif %}
2122

2223
{% assign page_start = 2 %}
@@ -34,15 +35,15 @@
3435

3536
{% for index in (page_start..page_end) %}
3637
{% if index == paginator.page %}
37-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
38+
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
3839
{% else %}
3940
{% comment %} Distance from current page and this link {% endcomment %}
4041
{% assign dist = paginator.page | minus: index %}
4142
{% if dist < 0 %}
4243
{% comment %} Distance must be a positive value {% endcomment %}
4344
{% assign dist = 0 | minus: dist %}
4445
{% endif %}
45-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
46+
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
4647
{% endif %}
4748
{% endfor %}
4849

@@ -54,15 +55,15 @@
5455
{% if paginator.page == paginator.total_pages %}
5556
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
5657
{% else %}
57-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
58+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
5859
{% endif %}
5960

6061
{% comment %} Link next page {% endcomment %}
6162
{% if paginator.next_page %}
62-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
63+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li></a></li>
6364
{% else %}
6465
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
6566
{% endif %}
6667
</ul>
6768
</nav>
68-
{% endif %}
69+
{% endif %}

docs/_docs/10-layouts.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ single_layout_gallery:
77
alt: "single layout with header example"
88
- image_path: /assets/images/mm-layout-single-meta.png
99
alt: "single layout with comments and related posts"
10-
modified: 2016-12-12T15:20:20-05:00
10+
modified: 2017-01-24T10:52:47-05:00
1111
---
1212

1313
{% include toc icon="columns" title="Included Layouts" %}
@@ -183,6 +183,16 @@ paginate: 5 # amount of posts to show
183183
paginate_path: /page:num/
184184
```
185185

186+
If you'd rather have a paginated page of posts reside in a subfolder instead of acting as your homepage make the following adjustments.
187+
188+
Create `index.html` in the location you'd like. For example if I wanted it to live at **/blog** I'd create `/blog/index.html` with `layout: home` in its YAML Front Matter.
189+
190+
Then adjust the `paginate_path` in **_config.yml** to match.
191+
192+
```yaml
193+
paginate_path: /blog/page:num
194+
```
195+
186196
**Note:** Jekyll can only paginate a single `index.html` file. If you'd like to paginate more pages (e.g. category indexes) you'll need the help of a custom plugin. For more pagination related settings check the [**Configuration**]({{ "/docs/configuration/#paginate" | absolute_url }}) section.
187197
{: .notice--info}
188198

docs/_docs/18-history.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ permalink: /docs/history/
44
excerpt: "Change log of enhancements and bug fixes made to the theme."
55
sidebar:
66
nav: docs
7-
modified: 2017-01-24T10:10:17-05:00
7+
modified: 2017-01-24T10:55:37-05:00
88
---
99

10+
## [4.2.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.1)
11+
12+
### Enhancements
13+
14+
- Improve `paginator.html` to support paginated pages that live inside of a subfolder. See [documentation](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#home-page) for more details. [#764](https://github.com/mmistakes/minimal-mistakes/pull/764/)
15+
16+
### Maintenance
17+
18+
- Add `https` protocol to Google Universal Analytics embed. [#772](https://github.com/mmistakes/minimal-mistakes/pull/772)
19+
1020
## [4.2.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.0)
1121

1222
### Enhancements

docs/_includes/analytics-providers/google-universal.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
33
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
44
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
5+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
66

77
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
88
ga('send', 'pageview');
9-
</script>
9+
</script>

docs/_includes/page__hero.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{% if page.header.overlay_color or page.header.overlay_image %}
2929
<div class="wrapper">
3030
<h1 class="page__title" itemprop="headline">
31-
{% if paginator %}
31+
{% if paginator and site.paginate_show_page_num %}
3232
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
3333
{% else %}
3434
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
@@ -50,4 +50,4 @@ <h1 class="page__title" itemprop="headline">
5050
{% if page.header.caption %}
5151
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
5252
{% endif %}
53-
</div>
53+
</div>

docs/_includes/paginator.html

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{% if paginator.total_pages > 1 %}
22
<nav class="pagination">
3+
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
34
<ul>
45
{% comment %} Link for previous page {% endcomment %}
56
{% if paginator.previous_page %}
67
{% if paginator.previous_page == 1 %}
7-
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
8+
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
89
{% else %}
9-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
10+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.previous_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
1011
{% endif %}
1112
{% else %}
12-
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
13+
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
1314
{% endif %}
1415

1516
{% comment %} First page {% endcomment %}
1617
{% if paginator.page == 1 %}
1718
<li><a href="#" class="disabled current">1</a></li>
1819
{% else %}
19-
<li><a href="{{ '/' | absolute_url }}">1</a></li>
20+
<li><a href="{{ first_page_path }}">1</a></li>
2021
{% endif %}
2122

2223
{% assign page_start = 2 %}
@@ -34,15 +35,15 @@
3435

3536
{% for index in (page_start..page_end) %}
3637
{% if index == paginator.page %}
37-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
38+
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
3839
{% else %}
3940
{% comment %} Distance from current page and this link {% endcomment %}
4041
{% assign dist = paginator.page | minus: index %}
4142
{% if dist < 0 %}
4243
{% comment %} Distance must be a positive value {% endcomment %}
4344
{% assign dist = 0 | minus: dist %}
4445
{% endif %}
45-
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
46+
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
4647
{% endif %}
4748
{% endfor %}
4849

@@ -54,15 +55,15 @@
5455
{% if paginator.page == paginator.total_pages %}
5556
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
5657
{% else %}
57-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
58+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
5859
{% endif %}
5960

6061
{% comment %} Link next page {% endcomment %}
6162
{% if paginator.next_page %}
62-
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
63+
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li></a></li>
6364
{% else %}
6465
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
6566
{% endif %}
6667
</ul>
6768
</nav>
68-
{% endif %}
69+
{% endif %}

docs/_pages/home.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ header:
77
cta_label: "<i class='fa fa-download'></i> Install Now"
88
cta_url: "/docs/quick-start-guide/"
99
caption:
10-
excerpt: 'A flexible two-column Jekyll theme. Perfect for personal sites, blogs, and portfolios hosted on GitHub or your own server.<br /> <small><a href="https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.0">Latest release v4.2.0</a></small><br /><br /> {::nomarkdown}<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=mmistakes&repo=minimal-mistakes&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=mmistakes&repo=minimal-mistakes&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>{:/nomarkdown}'
10+
excerpt: 'A flexible two-column Jekyll theme. Perfect for personal sites, blogs, and portfolios hosted on GitHub or your own server.<br /> <small><a href="https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.1">Latest release v4.2.1</a></small><br /><br /> {::nomarkdown}<iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=mmistakes&repo=minimal-mistakes&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe> <iframe style="display: inline-block;" src="https://ghbtns.com/github-btn.html?user=mmistakes&repo=minimal-mistakes&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>{:/nomarkdown}'
1111
feature_row:
1212
- image_path: /assets/images/mm-customizable-feature.png
1313
alt: "customizable"

minimal-mistakes-jekyll.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = "minimal-mistakes-jekyll"
5-
spec.version = "4.2.0"
5+
spec.version = "4.2.1"
66
spec.authors = ["Michael Rose"]
77

88
spec.summary = %q{A flexible two-column Jekyll theme.}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "minimal-mistakes",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"description": "Minimal Mistakes Jekyll theme npm build scripts",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)