Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance theme to fully support jekyll-paginate-v2 plugin #1307

Closed
2 tasks
jaybe-jekyll opened this issue Oct 17, 2017 · 9 comments
Closed
2 tasks

Enhance theme to fully support jekyll-paginate-v2 plugin #1307

jaybe-jekyll opened this issue Oct 17, 2017 · 9 comments

Comments

@jaybe-jekyll
Copy link
Contributor

jaybe-jekyll commented Oct 17, 2017

Feature request to add support for:


Notes:

  1. The minimal-mistakes-jekyll gem has an _includes/paginator.html include which gets included to produce the paging navigation and [lovely] UI. See the theme's _layouts/home.html layout for the calling.
  • The include refers to site.pagination_path to build the [proper] reference links to navigate between pages.
  • Note site.pagination_path refers to jekyll-paginate (version 1), not v2. Ergo, out of box, minimal-mistakes-jekyll gem is not designed to be compatible with jekyll-pagination-v2.
  • For example, if you try to use pagination outside of root path/URI / breakage will occur with pagination... unless adaptation to _includes/paginator.html has been accommodated.
    • e.g. ...{{ page.pagination.mypaginator_path | replace: ':cat', page.autopages.display_name | replace: 'page:num', '' | replace: '//', '/' | absolute_url %}}...
  1. The default _config.yml for minimal-mistakes-jekyll theme/gem does not contain configuration for jekyll-paginate-v2, which requires new/additional/different configuration to enable... both in _config.yml and then within the pages where you desire pagination, e.g.:
  • /index.html
    ---
    ...
    layout: my_home_layout_pagination_ready
    pagination:
      enabled
      per_page: 2
      ...
    ---
    

I was eventually able to integrate and implement:

  • minimal-mistakes-jekyll
  • jekyll-paginate-v2
    • ...along with it's AutoPages feature to generate category, tag, collection pages, etc.

It required addressing the aforementioned aspects however, which meant having the following files and adjusted outside of the minimal-mistakes-jekyll gem theme:

  • ./_layout/home.html
  • ./_layout/archive-taxonomy.html
  • ./_includes/paginator.html
  • ./index.html
  • ./_config.yml (expected)

Would very much like to see jekyll-paginate-v2 integration and capabilities without the need to maintain and manage core theme files within the site/source. Wonderful theme and offering! Thank you @mmistakes!

re: #1240
re: #issuecomment-337258095

@jaybe-jekyll
Copy link
Contributor Author

jaybe-jekyll commented Oct 18, 2017

related: jekyll/jekyll#6391

"Issues with hard coded checks for the decommissioned pagination gem in the main jekyll source #6391"

@mmistakes mmistakes changed the title Enhance Minimal Mistakes Jekyll to support jekyll-paginate-v2; re:#1240 Enhance theme to fully support jekyll-paginate-v2 plugin Oct 18, 2017
@douglangille
Copy link

This is what I did to get it to work on https://douglangille.ca with the gem'd theme:

https://github.com/douglangille/douglangille/blob/master/_config.yml
https://github.com/douglangille/douglangille/blob/master/_includes/paginator.html
https://github.com/douglangille/douglangille/blob/master/_layouts/autopage.html

As mentioned elsewhere, moving from jekyll-paginate to jekyll-paginate-v2 will remove the need for jekyll-archives. There will need to be some cleanup in a few places to fix that up. Right now, I have to leave references to jekyll-archives in _config.yml because I'm lazy.

I like @mmistakes' hand-rolled trailpath in paginator.html and I had to hack at it to get it to work with jekyll-paginate-v2. Moving to the new gem's trailpath functionality is ultimately cleaner tho.

@erickguan
Copy link
Contributor

erickguan commented Dec 7, 2017

If @mmistakes wants to support github-pages then jekyll-paginate-v2 is not really an option since it's not included in the gem yet. That's why I didn't update that in #1388.

@mmistakes
Copy link
Owner

mmistakes commented Dec 7, 2017

I'd be up for rolling in support for the superior jekyll-paginate-v2 plugin if/when it gets allowed on GitHub Pages. Same for its autopages feature.

I use both on my personal site, but not sure if there is a way to do them now and give the user a choice of falling back to the whitelisted gems. I sort of do that with Jekyll Archives support, but it's kind of messy and makes configuring confusing, especially for those not familiar with Jekyll.

@johnlane
Copy link

For anyone looking to implement jekyll-paginate-v2 now, coming here to find the links from @douglangille are dead, there is a compatible version of _includes/paginator.html here. I found that it offers the same behaviour as the theme's support for the default paginator.

Alternatively please read the blog post by @mmistakes.

@mmistakes you mention that you use jekyll-paginate-v2 on your own site - if your config is better (or more robust, or whatever) than that what I linked to then would you mind sharing a gist that we might use until the theme catches up? (great theme, by the way!!!)

@mmistakes
Copy link
Owner

mmistakes commented Dec 14, 2017

@johnlane I use jekyll-paginate-v2 on my own site but that's a completely different theme from Minimal Mistakes. So the config settings is likely not 1:1. I'm also using the plugin's Autopage feature to generate tag archives.

@stale
Copy link

stale bot commented Dec 27, 2018

This issue has been automatically marked as stale because it has not had recent activity.

If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Status: Stale label Dec 27, 2018
@stale stale bot closed this as completed Jan 15, 2019
@iBug
Copy link
Collaborator

iBug commented Jun 17, 2019

Can we get some insights on this? Paginate V2 is AWESOME and I'm trying to patch MM to adapt it for my site.

If needed, I can provide assistance or even fire up a PR for this.

@luispuerto
Copy link
Contributor

@iBug I would love to have paginate-v2 support! since I would like to be able to paginate paginate my jekyll archives, but I think that theme-wise we shouldn't drop compatibility with jekyll-paginate. Not everyone wants to build outside gh-pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants