From 696afd7ef20796f8d59cf7f47ccd1b397232270f Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 24 Jan 2017 10:44:39 -0500 Subject: [PATCH 1/4] Pagination now works for index.html files in subfolders. Links to next page consider baseurl now. (#764) --- docs/_includes/page__hero.html | 4 ++-- docs/_includes/paginator.html | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/_includes/page__hero.html b/docs/_includes/page__hero.html index ecc8d805..24488932 100644 --- a/docs/_includes/page__hero.html +++ b/docs/_includes/page__hero.html @@ -28,7 +28,7 @@ {% if page.header.overlay_color or page.header.overlay_image %}

- {% 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: "

" | remove: "

" }} @@ -50,4 +50,4 @@ {% if page.header.caption %} {{ page.header.caption | markdownify | remove: "

" | remove: "

" }}
{% endif %} -

\ No newline at end of file + diff --git a/docs/_includes/paginator.html b/docs/_includes/paginator.html index b6bf99a2..3cf71d82 100644 --- a/docs/_includes/paginator.html +++ b/docs/_includes/paginator.html @@ -1,22 +1,23 @@ {% if paginator.total_pages > 1 %} -{% endif %} \ No newline at end of file +{% endif %} From 83424b57c640025acb719868bdd874588f32a4b7 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 24 Jan 2017 10:55:21 -0500 Subject: [PATCH 2/4] Document moving paginated home page to an alternate location --- docs/_docs/10-layouts.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/_docs/10-layouts.md b/docs/_docs/10-layouts.md index 2409d61b..a8b60ced 100644 --- a/docs/_docs/10-layouts.md +++ b/docs/_docs/10-layouts.md @@ -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} From 7b5ea59a1292a43558b267b6b8850f99de6fcfed Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 24 Jan 2017 10:57:02 -0500 Subject: [PATCH 3/4] Update CHANGELOG and history --- CHANGELOG.md | 10 ++++++++++ docs/_docs/18-history.md | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe3c6e99..6b99af6d 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/docs/_docs/18-history.md b/docs/_docs/18-history.md index 15cb5287..e380c49a 100644 --- a/docs/_docs/18-history.md +++ b/docs/_docs/18-history.md @@ -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 From 93778ff7344f6524ab82d031313209b3624df30c Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Tue, 24 Jan 2017 10:57:08 -0500 Subject: [PATCH 4/4] Bump version to 4.2.1 --- docs/_pages/home.md | 2 +- minimal-mistakes-jekyll.gemspec | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_pages/home.md b/docs/_pages/home.md index e40d8e49..96b1b15e 100644 --- a/docs/_pages/home.md +++ b/docs/_pages/home.md @@ -7,7 +7,7 @@ header: cta_label: " 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.
Latest release v4.2.0

{::nomarkdown} {:/nomarkdown}' +excerpt: 'A flexible two-column Jekyll theme. Perfect for personal sites, blogs, and portfolios hosted on GitHub or your own server.
Latest release v4.2.1

{::nomarkdown} {:/nomarkdown}' feature_row: - image_path: /assets/images/mm-customizable-feature.png alt: "customizable" diff --git a/minimal-mistakes-jekyll.gemspec b/minimal-mistakes-jekyll.gemspec index 462d0e9b..49e71e77 100644 --- a/minimal-mistakes-jekyll.gemspec +++ b/minimal-mistakes-jekyll.gemspec @@ -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.} diff --git a/package.json b/package.json index 834b417a..4edb24a7 100644 --- a/package.json +++ b/package.json @@ -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",