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

Use first_page_path from Paginate V2 if available #2431

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

iBug
Copy link
Collaborator

@iBug iBug commented Mar 11, 2020

This is an enhancement or feature.

Use paginator.first_page_path from Paginate V2 plugin for better compatibility. The original jekyll-paginator doesn't have this variable so this PR will not affect sites using original paginator.

I was reviewing my local overrides of the theme when I noticed this change and I even forgot what the problem was (what this change solved) but I hope this is helpful.

@iBug
Copy link
Collaborator Author

iBug commented Mar 12, 2020

I managed to recall what the problem was. If :num is used alone (instead of page:num) then the previous code would generate wrong results. I have paginate_path: /blog/:num/ in my config and I expect pages to have URLs like /blog/2/ instead of /blog/page2/, which wasn't available before.

@mmistakes mmistakes merged commit 4e25e52 into mmistakes:master Mar 17, 2020
@iBug iBug deleted the paginate-v2-first-page-path branch March 17, 2020 04:03
jesuswasrasta pushed a commit to jesuswasrasta/jesuswasrasta.github.io that referenced this pull request Jul 8, 2020
mzaffran pushed a commit to mzaffran/mzaffran.github.io that referenced this pull request Jan 4, 2021
kaitokikuchi pushed a commit to kaitokikuchi/kaitokikuchi.github.io that referenced this pull request Sep 4, 2023
chukycheese pushed a commit to chukycheese/chukycheese.github.io that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants