Skip to content

add dynamic social sharing metadata#106

Open
Piyushbijarania wants to merge 2 commits into
StabilityNexus:mainfrom
Piyushbijarania:metadata
Open

add dynamic social sharing metadata#106
Piyushbijarania wants to merge 2 commits into
StabilityNexus:mainfrom
Piyushbijarania:metadata

Conversation

@Piyushbijarania

@Piyushbijarania Piyushbijarania commented Jul 22, 2026

Copy link
Copy Markdown

Addressed Issues:

add dynamic social sharing metadata

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features
    • Added SEO metadata for article pages, including canonical URLs, article previews, images, descriptions, and Twitter card information.
    • Improved metadata handling when an article cannot be found.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Piyushbijarania, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0223831e-30f8-43a7-aea2-d2f9be8dacc4

📥 Commits

Reviewing files that changed from the base of the PR and between 0e1b106 and 773e77d.

📒 Files selected for processing (1)
  • lib/blog-server.ts

Walkthrough

The post route now asynchronously resolves slug parameters, loads the matching post, and generates canonical, OpenGraph, and Twitter metadata. Missing posts return empty metadata, and the page component adopts the asynchronous parameter type.

Changes

Post metadata generation

Layer / File(s) Summary
Metadata generation and async page parameters
app/a/[slug]/page.tsx
Adds generateMetadata, post lookup, canonical/OpenGraph/Twitter metadata construction, missing-post handling, and asynchronous params handling in the page component.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: Typescript Lang

Poem

I’m a rabbit with metadata bright,
Canonical carrots aligned just right.
OpenGraph leaves and Twitter blooms,
Slugs hop softly through page rooms.
Missing posts vanish without a sound—
SEO magic springs from the ground!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding dynamic social sharing metadata for the route.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/a/`[slug]/page.tsx:
- Around line 13-16: Wrap getPostBySlugServer in a shared React cache and use
the memoized loader in both generateMetadata and Page. Replace each direct
lookup with the shared cached function while preserving the existing slug
argument and post-handling behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 845b9194-9759-4824-b98c-a86d491a5e45

📥 Commits

Reviewing files that changed from the base of the PR and between 88e747f and 0e1b106.

📒 Files selected for processing (1)
  • app/a/[slug]/page.tsx

Comment thread app/a/[slug]/page.tsx
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