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

Support rendering empty data in pagination #2208

Merged
merged 1 commit into from
May 11, 2022

Conversation

TheDocTrier
Copy link
Contributor

@TheDocTrier TheDocTrier commented Feb 7, 2022

This is aiming to provide an update that resolves #731 and resolves #1185.

This patch adds the pagination option renderEmpty:

pagination:
  # if data is empty, renders single page with empty chunk
  renderEmpty: true

This pull request probably needs a test written for it. I'm not sure what the process is like here.

Documentation is provided with 11ty/11ty-website#1327.

@zachleat
Copy link
Member

Going to do a big ol’ mutant merge of this one and #1698

@zachleat zachleat merged commit 7da411d into 11ty:master May 11, 2022
zachleat added a commit to Jaza/eleventy that referenced this pull request May 11, 2022
zachleat added a commit that referenced this pull request May 11, 2022
@TheDocTrier
Copy link
Contributor Author

TheDocTrier commented May 11, 2022

@zachleat thanks for handling these pull requests.

@zachleat
Copy link
Member

Went with generatePageOnEmptyData. This will ship with 2.0.0-canary.10

I’ll ship that docs PR next!

@zachleat zachleat added enhancement feature: 📦 pagination Related to Eleventy’s pagination feature labels May 11, 2022
@zachleat zachleat added this to the Eleventy 2.0.0 milestone May 11, 2022
@zachleat
Copy link
Member

Test provided by #1698

@zachleat
Copy link
Member

Docs PR shipped 11ty/11ty-website#1327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature: 📦 pagination Related to Eleventy’s pagination feature
Projects
None yet
2 participants