The frontmatter type extending Record<string, any>
The complete array of navigation objects to paginate
Number of items per page
The page number to retrieve (1-based index)
Object containing paginated data and metadata. See PagerObj
Returns page 2 with 10 items per page
const result = getPagedData(navigationObjects, 10, 2);
console.log(result.pagedData); // Items 11-20
console.log(result.isFirstPage); // false
console.log(result.totalPages); // Total number of pages
This replaces the Pager class. See Pager.
Paginates an array of navigation objects and returns page metadata.