Skip to content

[main] refactor: simplify pagination to Previous/Next layout#473

Merged
kkhys merged 2 commits intomainfrom
refactor/simplify-pagination
Feb 28, 2026
Merged

[main] refactor: simplify pagination to Previous/Next layout#473
kkhys merged 2 commits intomainfrom
refactor/simplify-pagination

Conversation

@kkhys
Copy link
Owner

@kkhys kkhys commented Feb 28, 2026

  • Replace numbered pagination with Previous/Next navigation
  • Improve accessibility with rel attributes and proper ARIA roles
  • Remove unused chevron icon assets (chevron-left.svg, chevron-right.svg)
  • Simplify component by removing page number generation logic

Replace numbered pagination (1 2 3 ... N) with a simpler Previous/Next
navigation pattern. This improves UX by reducing cognitive load and
simplifies the component structure.

Changes:
- Remove generateVisiblePages function and page number rendering
- Replace icon-based buttons with text links (Previous/Next)
- Add rel="prev" and rel="next" attributes for SEO
- Use role="link" and aria-disabled for better accessibility
- Delete unused chevron-left.svg and chevron-right.svg icons

The pagination now shows Previous and Next links in center alignment,
with disabled state (50% opacity) when unavailable.
Update pagination component usage across all blog page routes to remove
the now-unused baseUrl prop. The component now relies solely on
page.url.prev and page.url.next from Astro's pagination API.

Updated routes:
- /blog
- /blog/categories/[category]
- /blog/tags/[tag]
@kkhys kkhys self-assigned this Feb 28, 2026
@kkhys kkhys marked this pull request as ready for review February 28, 2026 07:52
@kkhys kkhys merged commit abe2678 into main Feb 28, 2026
1 check passed
@kkhys kkhys deleted the refactor/simplify-pagination branch February 28, 2026 07:53
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.

1 participant