Merge branch 'release/4.2.1'
This commit is contained in:
commit
3a7e43875f
12 changed files with 63 additions and 31 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,3 +1,13 @@
|
|||
## [4.2.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.1)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- 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/)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- Add `https` protocol to Google Universal Analytics embed. [#772](https://github.com/mmistakes/minimal-mistakes/pull/772)
|
||||
|
||||
## [4.2.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.0)
|
||||
|
||||
### Enhancements
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{% if page.header.overlay_color or page.header.overlay_image %}
|
||||
<div class="wrapper">
|
||||
<h1 class="page__title" itemprop="headline">
|
||||
{% if paginator %}
|
||||
{% if paginator and site.paginate_show_page_num %}
|
||||
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
|
||||
{% else %}
|
||||
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{% if paginator.total_pages > 1 %}
|
||||
<nav class="pagination">
|
||||
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
|
||||
<ul>
|
||||
{% comment %} Link for previous page {% endcomment %}
|
||||
{% if paginator.previous_page %}
|
||||
{% if paginator.previous_page == 1 %}
|
||||
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
<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>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
|
||||
|
@ -16,7 +17,7 @@
|
|||
{% if paginator.page == 1 %}
|
||||
<li><a href="#" class="disabled current">1</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/' | absolute_url }}">1</a></li>
|
||||
<li><a href="{{ first_page_path }}">1</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% assign page_start = 2 %}
|
||||
|
@ -34,7 +35,7 @@
|
|||
|
||||
{% for index in (page_start..page_end) %}
|
||||
{% if index == paginator.page %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
|
||||
{% else %}
|
||||
{% comment %} Distance from current page and this link {% endcomment %}
|
||||
{% assign dist = paginator.page | minus: index %}
|
||||
|
@ -42,7 +43,7 @@
|
|||
{% comment %} Distance must be a positive value {% endcomment %}
|
||||
{% assign dist = 0 | minus: dist %}
|
||||
{% endif %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
@ -54,12 +55,12 @@
|
|||
{% if paginator.page == paginator.total_pages %}
|
||||
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% comment %} Link next page {% endcomment %}
|
||||
{% if paginator.next_page %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
|
||||
<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>
|
||||
{% else %}
|
||||
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
|
||||
{% endif %}
|
||||
|
|
|
@ -7,7 +7,7 @@ single_layout_gallery:
|
|||
alt: "single layout with header example"
|
||||
- image_path: /assets/images/mm-layout-single-meta.png
|
||||
alt: "single layout with comments and related posts"
|
||||
modified: 2016-12-12T15:20:20-05:00
|
||||
modified: 2017-01-24T10:52:47-05:00
|
||||
---
|
||||
|
||||
{% include toc icon="columns" title="Included Layouts" %}
|
||||
|
@ -183,6 +183,16 @@ paginate: 5 # amount of posts to show
|
|||
paginate_path: /page:num/
|
||||
```
|
||||
|
||||
If you'd rather have a paginated page of posts reside in a subfolder instead of acting as your homepage make the following adjustments.
|
||||
|
||||
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.
|
||||
|
||||
Then adjust the `paginate_path` in **_config.yml** to match.
|
||||
|
||||
```yaml
|
||||
paginate_path: /blog/page:num
|
||||
```
|
||||
|
||||
**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.
|
||||
{: .notice--info}
|
||||
|
||||
|
|
|
@ -4,9 +4,19 @@ permalink: /docs/history/
|
|||
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
||||
sidebar:
|
||||
nav: docs
|
||||
modified: 2017-01-24T10:10:17-05:00
|
||||
modified: 2017-01-24T10:55:37-05:00
|
||||
---
|
||||
|
||||
## [4.2.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.1)
|
||||
|
||||
### Enhancements
|
||||
|
||||
- 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/)
|
||||
|
||||
### Maintenance
|
||||
|
||||
- Add `https` protocol to Google Universal Analytics embed. [#772](https://github.com/mmistakes/minimal-mistakes/pull/772)
|
||||
|
||||
## [4.2.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.2.0)
|
||||
|
||||
### Enhancements
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{% if page.header.overlay_color or page.header.overlay_image %}
|
||||
<div class="wrapper">
|
||||
<h1 class="page__title" itemprop="headline">
|
||||
{% if paginator %}
|
||||
{% if paginator and site.paginate_show_page_num %}
|
||||
{{ site.title }}{% unless paginator.page == 1 %} {{ site.data.ui-text[site.locale].page | default: "Page" }} {{ paginator.page }}{% endunless %}
|
||||
{% else %}
|
||||
{{ page.title | default: site.title | markdownify | remove: "<p>" | remove: "</p>" }}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{% if paginator.total_pages > 1 %}
|
||||
<nav class="pagination">
|
||||
{% assign first_page_path = site.paginate_path | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}
|
||||
<ul>
|
||||
{% comment %} Link for previous page {% endcomment %}
|
||||
{% if paginator.previous_page %}
|
||||
{% if paginator.previous_page == 1 %}
|
||||
<li><a href="{{ '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
<li><a href="{{ first_page_path }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.previous_page | append: '/' }}">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</a></li>
|
||||
<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>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_previous | default: "Previous" }}</span></a></li>
|
||||
|
@ -16,7 +17,7 @@
|
|||
{% if paginator.page == 1 %}
|
||||
<li><a href="#" class="disabled current">1</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/' | absolute_url }}">1</a></li>
|
||||
<li><a href="{{ first_page_path }}">1</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% assign page_start = 2 %}
|
||||
|
@ -34,7 +35,7 @@
|
|||
|
||||
{% for index in (page_start..page_end) %}
|
||||
{% if index == paginator.page %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}" class="disabled current">{{ index }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', index | replace: '//', '/' | absolute_url }}" class="disabled current">{{ index }}</a></li>
|
||||
{% else %}
|
||||
{% comment %} Distance from current page and this link {% endcomment %}
|
||||
{% assign dist = paginator.page | minus: index %}
|
||||
|
@ -42,7 +43,7 @@
|
|||
{% comment %} Distance must be a positive value {% endcomment %}
|
||||
{% assign dist = 0 | minus: dist %}
|
||||
{% endif %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ index | append: '/' }}">{{ index }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', index | absolute_url }}">{{ index }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
@ -54,12 +55,12 @@
|
|||
{% if paginator.page == paginator.total_pages %}
|
||||
<li><a href="#" class="disabled current">{{ paginator.page }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.total_pages }}/">{{ paginator.total_pages }}</a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', paginator.total_pages | replace: '//', '/' | absolute_url }}">{{ paginator.total_pages }}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% comment %} Link next page {% endcomment %}
|
||||
{% if paginator.next_page %}
|
||||
<li><a href="{{ '/page' | absolute_url }}{{ paginator.next_page }}/">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
|
||||
<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>
|
||||
{% else %}
|
||||
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
|
||||
{% endif %}
|
||||
|
|
|
@ -7,7 +7,7 @@ header:
|
|||
cta_label: "<i class='fa fa-download'></i> Install Now"
|
||||
cta_url: "/docs/quick-start-guide/"
|
||||
caption:
|
||||
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}'
|
||||
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}'
|
||||
feature_row:
|
||||
- image_path: /assets/images/mm-customizable-feature.png
|
||||
alt: "customizable"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "minimal-mistakes-jekyll"
|
||||
spec.version = "4.2.0"
|
||||
spec.version = "4.2.1"
|
||||
spec.authors = ["Michael Rose"]
|
||||
|
||||
spec.summary = %q{A flexible two-column Jekyll theme.}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minimal-mistakes",
|
||||
"version": "4.2.0",
|
||||
"version": "4.2.1",
|
||||
"description": "Minimal Mistakes Jekyll theme npm build scripts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
Loading…
Reference in a new issue