Posts/pages pagination

Roadmap Card

Description

I want to be able to paginate my posts as I do with the lists of posts. There is a Gutenberg block named Page Break that add pagination for the posts/pages.

User Stories

As a Frontity user
I want to use the WP posts pagination
so that I can split long posts

Examples

You can find and example of one post splitted using Page Break Gutenberg block at this url.

Possible solution

It seems that in the WP REST API, the only information you can find about the post pagination is a comment <!--nextpage--> included in the content. I guess we should process the content and add some logic or create different REST API endpoints splitting the post.

Interesting… Does the <!--nextpage--> remain in the content.rendered field? I thought all the comments were stripped out.

Yes, it does! You can look at it at this endpoint of our test site -> https://test.frontity.io/?rest_route=/wp/v2/posts&slug=test-multiple-blocks.

I see. This is interesting. I wonder why the other comments are removed…