-
-
Notifications
You must be signed in to change notification settings - Fork 907
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
reads pagination also from include and layout. remove posts subfield. #26
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain further more to me? Thanks and regards
@@ -1,14 +1,19 @@ | |||
{%- if page.paginator -%} | |||
{%- assign params = include -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cengique, I can not understand why you assign this params
variable but never use it.
{%- assign paginator = include.paginator -%} | ||
{%- elsif layout.paginator -%} | ||
{%- assign paginator = layout.paginator -%} | ||
{%- elsif page.paginator -%} | ||
{%- assign paginator = page.paginator -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
I edited
pagination.html
to read thepaginator
parameter from a number of places. It really can't read frompage
because of all the nested layouts.I also had to flatten it and pass the
posts
array 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?