Skip to content

Commit 6270161

Browse files
committed
Add documentation for the incoming Jekyll Paginate V2 support
1 parent b940af2 commit 6270161

File tree

5 files changed

+63
-21
lines changed

5 files changed

+63
-21
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Enhancements
6+
7+
- Add support for [Jekyll Paginate V2](https://github.com/sverrirs/jekyll-paginate-v2) 🎉 [#2636](https://github.com/mmistakes/minimal-mistakes/pull/2636)
8+
59
### Documentation
610

711
- Rewrite skin previews on `05-configuration.md` in Liquid template.

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ task :preview do
8383
Jekyll::Commands::Serve.process(options)
8484
end
8585

86+
task :history => :changelog
8687
task :changelog => "docs/_docs/18-history.md"
8788
file "docs/_docs/18-history.md" => "CHANGELOG.md" do |t|
8889
front_matter = {

_includes/figure

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<figure class="{{ include.class }}">
22
<img src="{{ include.image_path | relative_url }}"
3-
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
3+
alt="{% if include.alt %}{{ include.alt }}{% endif %}" />
44
{%- if include.caption -%}
55
<figcaption>
66
{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}

docs/_docs/05-configuration.md

+52-19
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ defaults:
276276

277277
To disable reading time for a post, add `read_time: false` to its YAML Front Matter to override what was set in `_config.yml`.
278278

279-
`words_per_minute` can also be adjusted per-page basis by adding to its YAML Front Matter. This is useful for sites with multi-lingual content where you'd like specify a different value from the site config.
279+
`words_per_minute` can also be adjusted on a per-page basis by adding to its YAML Front Matter. This is useful for sites with multi-lingual content where you'd like specify a different value from the site config.
280280

281281
```yaml
282282
words_per_minute: 250
@@ -327,7 +327,7 @@ defaults:
327327

328328
If you add `comments: false` to a post's YAML Front Matter it will override the default and disable comments for just that post.
329329

330-
**Note:** Comments are disabled by default in `development`. To enable when testing/building locally be sure to set
330+
**Note:** Comments are disabled in `development`. To enable when testing/building locally be sure to set
331331
`JEKYLL_ENV=production` to [force the environment](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time) to production.
332332
{: .notice--info}
333333

@@ -760,7 +760,7 @@ twitter:
760760

761761
And if I assign `@mmistakes` as an author account it will appear in the Twitter Card along with `@mmistakes-theme`, attributed as a creator of the page being shared.
762762

763-
**Note**: You need to validate cards are working and have Twitter [approve Player Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/player-card) before they will begin showing up.
763+
**Note**: You need to validate cards are working and have Twitter [approve Player Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/player-card) before they begin showing up.
764764
{: .notice--warning}
765765

766766
##### Facebook Open Graph
@@ -791,22 +791,25 @@ For pages that don't have a `header.image` assigned in their YAML Front Matter,
791791
og_image: /assets/images/site-logo.png
792792
```
793793

794-
<figure>
795-
<img src="{{ '/assets/images/mm-twitter-card-summary-image.jpg' | relative_url }}" alt="Twitter Card summary example">
796-
<figcaption>Example of a image placed in a Summary Card.</figcaption>
797-
</figure>
794+
{% include figure
795+
image_path="/assets/images/mm-twitter-card-summary-image.jpg"
796+
alt="Twitter Card summary example"
797+
caption="Example of an image placed in a Summary Card."
798+
%}
798799

799800
Documents who have a `header.image` assigned in their YAML Front Matter will appear like this when shared on Twitter and Facebook.
800801

801-
<figure>
802-
<img src="{{ '/assets/images/mm-twitter-card-summary-large.jpg' | relative_url }}" alt="page shared on Twitter">
803-
<figcaption>Shared page on Twitter with header image assigned.</figcaption>
804-
</figure>
802+
{% include figure
803+
image_path="/assets/images/mm-twitter-card-summary-large.jpg"
804+
alt="page shared on Twitter"
805+
caption="Shared page on Twitter with header image assigned."
806+
%}
805807

806-
<figure>
807-
<img src="{{ '/assets/images/facebook-share-example.jpg' | relative_url }}" alt="page shared on Facebook">
808-
<figcaption>Shared page on Facebook with header image assigned.</figcaption>
809-
</figure>
808+
{% include figure
809+
image_path="/assets/images/facebook-share-example.jpg"
810+
alt="page shared on Facebook"
811+
caption="Shared page on Facebook with header image assigned."
812+
%}
810813

811814
##### Include your social profile in search results
812815

@@ -846,7 +849,7 @@ analytics:
846849

847850
To use another provider not included with the theme set `provider: "custom"` then add their embed code to `_includes/analytics-providers/custom.html`.
848851

849-
**Note:** Analytics are disabled by default in `development`. To enable when testing/building locally be sure to set
852+
**Note:** Analytics are disabled in `development`. To enable when testing/building locally be sure to set
850853
`JEKYLL_ENV=production` to [force the environment](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time) to production.
851854
{: .notice--info}
852855

@@ -933,7 +936,7 @@ Nothing out of the ordinary here. `include` and `exclude` may be the only things
933936

934937
## Conversion and Markdown processing
935938

936-
Again nothing out of the ordinary here as the theme adheres to the defaults used by GitHub Pages. [**Kramdown**](http://kramdown.gettalong.org/) for Markdown conversion, [**Rouge**](http://rouge.jneen.net/) syntax highlighting, and incremental building disabled. Change them if you need to.
939+
Again nothing out of the ordinary here as the theme adheres to the defaults used by GitHub Pages. [**Kramdown**](http://kramdown.gettalong.org/) for Markdown conversion, [**Rouge**](https://rouge.jneen.net/) syntax highlighting, and incremental building disabled. Change them if you need to.
937940

938941
## Front Matter Defaults
939942

@@ -1005,16 +1008,46 @@ The paginator only works on files with name `index.html`. To use pagination in a
10051008
paginate_path: /recent/page:num/
10061009
```
10071010

1008-
**Please note:** When using Jekyll's default [pagination plugin](https://jekyllrb.com/docs/pagination/) `paginator.posts` can only be called once. If you're looking for something more powerful that can paginate category, tag, and collection pages, [**jekyll-paginate-v2**](https://github.com/sverrirs/jekyll-paginate-v2) is the way to go.
1011+
**Please note:** When using Jekyll's default [pagination plugin](https://jekyllrb.com/docs/pagination/) `paginator.posts` can only be called once. If you're looking for something more powerful that can paginate category, tag, and collection pages, [**jekyll-paginate-v2**][jekyll-paginate-v2] is the way to go.
10091012
{: .notice--info}
10101013

1014+
[jekyll-paginate-v2]: https://github.com/sverrirs/jekyll-paginate-v2
1015+
10111016
#### Using Jekyll Paginate V2
10121017

1013-
Jekyll Paginate V2 is not available on GitHub Pages. You must build your site locally or with a CI service like [GitHub Actions][gh-pages-actions].
1018+
**Note:** Jekyll Paginate V2 is **not** available on GitHub Pages. You must build your site locally or with a CI service like [GitHub Actions][gh-pages-actions].
10141019
{: .notice--info}
10151020

10161021
[gh-pages-actions]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
10171022

1023+
If you opt to use [Jekyll Paginate V2][jekyll-paginate-v2], remove `paginate` from `_config.yml` and add the following configuration to your `_config.yml`:
1024+
1025+
```yaml
1026+
# Pagination with jekyll-paginate-v2
1027+
# See https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md#site-configuration
1028+
# for configuration details
1029+
pagination:
1030+
enabled: true
1031+
debug: false
1032+
collection: 'posts'
1033+
per_page: 10
1034+
permalink: '/page/:num/'
1035+
title: ':title - page :num'
1036+
limit: 0
1037+
sort_field: 'date'
1038+
sort_reverse: true
1039+
category: 'posts'
1040+
tag: ''
1041+
locale: ''
1042+
trail:
1043+
before: 2
1044+
after: 2
1045+
```
1046+
1047+
Minimal Mistakes will automatically pick up Jekyll Paginate V2 mode if it detects the `pagination.enabled` setting in `_config.yml`.
1048+
1049+
While the plugin allows you to change the `indexpage` and the `extension` (which default to `index` and `html` respectively), Minimal Mistakes do not support non-default values for these settings, so you should keep them as-is.
1050+
10181051
### Timezone
10191052

10201053
This sets the timezone environment variable, which Ruby uses to handle time and date creation and manipulation. Any entry from the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is valid. The default is the local time zone, as set by your operating system.

docs/_docs/18-history.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: "/docs/history/"
55
excerpt: Change log of enhancements and bug fixes made to the theme.
66
sidebar:
77
nav: docs
8-
last_modified_at: '2024-05-04T23:32:02+08:00'
8+
last_modified_at: '2024-05-05T00:00:06+08:00'
99
toc: false
1010
---
1111

@@ -17,6 +17,10 @@ toc: false
1717
{% raw %}
1818
## Unreleased
1919

20+
### Enhancements
21+
22+
- Add support for [Jekyll Paginate V2](https://github.com/sverrirs/jekyll-paginate-v2) 🎉 [#2636](https://github.com/mmistakes/minimal-mistakes/pull/2636)
23+
2024
### Documentation
2125

2226
- Rewrite skin previews on `05-configuration.md` in Liquid template.

0 commit comments

Comments
 (0)