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

Add select maximum number of posts per page #866

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Conversation

BernatBC
Copy link
Member

Issue

None, it's just a feature.

Description

With this parameter you can select the maximum number of posts that will appear to each page. It will default to 12 (the value that we were using before). To configure it, just add the following lines under the params section of config.yaml:

postsPage:
    maxPostsPerPage: 20 # Default: 12

Before I add this into the guides and the example file, tell me if you want to change the name of the parameter, or if I have to change the location of it.

Test Evidence

maxPostsPerPage=5

image

maxPostsPerPage=10

image

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for toha-ci ready!

Name Link
🔨 Latest commit 7297b7c
🔍 Latest deploy log https://app.netlify.com/sites/toha-ci/deploys/65aabcf7ed5cbc000848d619
😎 Deploy Preview https://deploy-preview-866--toha-ci.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@hossainemruz hossainemruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @BernatBC for the PR. Look like a reasonable feature to add. I just requested two small adjustments. Otherwise, the PR looks good.

layouts/_default/list.html Outdated Show resolved Hide resolved
Copy link
Member

@hossainemruz hossainemruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @BernatBC!

Copy link
Member

@hossainemruz hossainemruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look like the build is failing. Can you please fix that?

@BernatBC
Copy link
Member Author

I added it to the example site.
If you want, I can add it to the guides aswell.

@BernatBC BernatBC requested a review from hossainemruz January 19, 2024 18:11
@BernatBC
Copy link
Member Author

I'll fix it now

@kodiakhq kodiakhq bot merged commit def5ce6 into hugo-toha:main Jan 19, 2024
11 of 12 checks passed
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.

2 participants