reads pagination also from include and layout. remove posts subfield.#26
Open
cengique wants to merge 1 commit intojeffreytse:masterfrom
Open
reads pagination also from include and layout. remove posts subfield.#26cengique wants to merge 1 commit intojeffreytse:masterfrom
cengique wants to merge 1 commit intojeffreytse:masterfrom
Conversation
jeffreytse
reviewed
Mar 10, 2021
Owner
jeffreytse
left a comment
There was a problem hiding this comment.
Could you explain further more to me? Thanks and regards
| @@ -1,14 +1,19 @@ | |||
| {%- if page.paginator -%} | |||
| {%- assign params = include -%} | |||
Owner
There was a problem hiding this comment.
Hi @cengique, I can not understand why you assign this params variable but never use it.
| {%- elsif layout.paginator -%} | ||
| {%- assign paginator = layout.paginator -%} | ||
| {%- elsif page.paginator -%} | ||
| {%- assign paginator = page.paginator -%} |
Owner
There was a problem hiding this comment.
when we are using the page.paginator, it is from jekyll-paginate, the paginator has no the size attribute, it will cause the corruption.
e871820 to
d5af3e1
Compare
3001c74 to
826e97f
Compare
c9de297 to
9ecb45b
Compare
bd29ba6 to
df61d0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I edited
pagination.htmlto read thepaginatorparameter from a number of places. It really can't read frompagebecause of all the nested layouts.I also had to flatten it and pass the
postsarray directly. Otherwise, I could not figure out how to send a filtered dynamic list of posts to it. So now I could call it like this:I searched in your code to see if there was a specific use case for your version. Does this break compatibility with code that you have?