Skip to content

feat(articles): show next and previous posts - #86

Merged
calebephrem merged 1 commit into
open-devhub:mainfrom
krishs01:feature/more-like-this-posts
Sep 23, 2026
Merged

calebephrem merged 1 commit into
open-devhub:mainfrom
krishs01:feature/more-like-this-posts

Conversation

@krishs01

@krishs01 krishs01 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the "More like this" section in article pages to show the article's next/previous posts instead of simply displaying the latest two posts. The current article is excluded from the results.

Closes

Type of change(s)

  • Bug fix
  • New feature
  • Documentation update
  • Style / UI change
  • Refactor (no functional change)
  • Performance improvement
  • Other

Checklist

  • I've tested this change locally and it works as expected
  • bun run lint or npm run lint completes without warnings or errors
  • bun run build or npm run build completes successfully
  • My commit messages follow Conventional Commits (e.g. feat: ..., fix: ..., chore: ...)
  • I've updated relevant documentation (README, comments, etc.) if needed
  • I've removed any temporary debugging code (e.g. console.log)

Screenshots / recordings (if applicable)

Not applicable — this change updates the article recommendation logic without changing the UI design.

Anything else the reviewer should know?

The Prettier formatting command could not be run because Prettier is not currently available in the project's installed dependencies. No unrelated formatting changes were included in this PR.

@devhub-bot

devhub-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@calebephrem calebephrem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening the pr!

You did it well, but we don't want two navigation lines though, so the <- Previous and Next -> links are unnecessary here, so remove em. otherwise, it's perfect!

Image

Comment thread app/blog/[slug]/page.tsx Outdated
Comment on lines +205 to +228
<div className="flex items-center justify-between gap-md">
{prevPost ? (
<Link
href={`/blog/${prevPost.slug}`}
className="flex items-center gap-sm text-sm text-text-secondary hover:text-text transition-colors undecorated"
>
<ArrowLeft size={16} />
<span>Previous</span>
</Link>
) : (
<div />
)}
{nextPost ? (
<Link
href={`/blog/${nextPost.slug}`}
className="flex items-center gap-sm text-sm text-text-secondary hover:text-text transition-colors undecorated"
>
<span>Next</span>
<ArrowRight size={16} />
</Link>
) : (
<div />
)}
</div>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div className="flex items-center justify-between gap-md">
{prevPost ? (
<Link
href={`/blog/${prevPost.slug}`}
className="flex items-center gap-sm text-sm text-text-secondary hover:text-text transition-colors undecorated"
>
<ArrowLeft size={16} />
<span>Previous</span>
</Link>
) : (
<div />
)}
{nextPost ? (
<Link
href={`/blog/${nextPost.slug}`}
className="flex items-center gap-sm text-sm text-text-secondary hover:text-text transition-colors undecorated"
>
<span>Next</span>
<ArrowRight size={16} />
</Link>
) : (
<div />
)}
</div>

@krishs01
krishs01 force-pushed the feature/more-like-this-posts branch from 2567704 to 5481567 Compare September 23, 2026 15:14
@krishs01

Copy link
Copy Markdown
Contributor Author

Hii @calebephrem, I've done the requested changes, Kindly review it.

@devhub-bot

devhub-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@calebephrem calebephrem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@calebephrem
calebephrem merged commit 0f62c7a into open-devhub:main Sep 23, 2026
4 checks passed
@calebephrem

Copy link
Copy Markdown
Member

Thanks for contributing!

This branch was successfully deployed

1 active deployment
Preview 5481567c Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the "more like this" section in articles next/prev posts instead of latest 2

2 participants