Test Pagination Post 1

This is a test post to verify pagination functionality. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Testing Pagination

We need more posts to test pagination properly. This is one of several test posts created for that purpose.

Code Example

const paginate = (posts, pageSize) => {
  const pages = Math.ceil(posts.length / pageSize);
  return Array.from({ length: pages }, (_, i) => {
    const start = i * pageSize;
    return posts.slice(start, start + pageSize);
  });
};

Pagination is an important feature for blogs with many posts.