Skip to content

fix: Previous/Next post navigation not working correctly in i18n blog #2

@p-iknow

Description

@p-iknow

Bug Description

The previous/next post navigation links at the bottom of blog posts are not working as intended.

Expected Behavior

  • Previous/Next links should only show posts in the same language
  • Posts should be ordered chronologically (by publication date)
  • Navigation should work correctly for both /en/ and /ko/ routes

Current Behavior

  • Links are not filtered by current language
  • Posts are not in chronological order
  • Navigation shows mixed language posts

Steps to Reproduce

  1. Go to any blog post (e.g., /en/blog/post-title)
  2. Scroll to bottom of the page
  3. Check Previous/Next post links
  4. Observe incorrect language mixing or wrong chronological order

Environment

  • Astro + TypeScript + Tailwind
  • i18n configuration enabled
  • Routes: /en/blog/ and /ko/blog/

Technical Context

Need to fix the logic that:

  • Filters posts by current page language
  • Sorts posts by publication date
  • Generates correct previous/next navigation links

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions