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 pagination info to sections #2653

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

ZzMzaw
Copy link

@ZzMzaw ZzMzaw commented Sep 29, 2024

Objective of this small update is to add some minimal information about pagination in the section itself for cases where the paginator is not available (e.g. when using get_section).

A small site for testing the feature is attached to this PR: testsite.zip.

This feature has been discussed in issue 2473.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

@@ -162,6 +162,9 @@ pub struct SerializingSection<'a> {
backlinks: Vec<BackLink<'a>>,
generate_feeds: bool,
transparent: bool,
paginated: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for that one, let's match what is in the frontmatter

Copy link
Author

Choose a reason for hiding this comment

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

I just removed the unecessary paginated attribute and retrieved raw values from the frontmatter.

Adapted testsite: testsite.zip

`paginated` attributes removed
ZzMzaw added a commit to ZzMzaw/zola-theme-tabi that referenced this pull request Oct 11, 2024
Changes have been requested in Zola PR: getzola/zola#2653.
This requieres minor adaptation on properties used to reversed pagination.
@Keats Keats merged commit ad79860 into getzola:next Oct 11, 2024
5 checks passed
@ZzMzaw ZzMzaw deleted the feat/get_section-pagination_info branch October 15, 2024 04:45
ZzMzaw added a commit to ZzMzaw/zola-theme-tabi that referenced this pull request Oct 31, 2024
Changes have been requested in Zola PR: getzola/zola#2653.
This requieres minor adaptation on properties used to reversed pagination.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants