feat(seo): add Open Graph and Twitter social cards#123
Conversation
Every public page now emits Open Graph and Twitter card tags (title, description, url, image) so links render branded previews on LinkedIn, Slack, WhatsApp and X. - Add a branded 1200x630 social card generated with next/og, served site-wide via app/opengraph-image and reused for app/twitter-image. - Add buildMetadata() helper that produces matching title/description/ canonical plus OG and Twitter card objects for each page. - Route home and auth pages through the helper; add OG/Twitter defaults to the root layout for inheritance. Refs #106
|
Claude finished @prudentbird's task —— View job PR Review: Social Cards Implementation ✅I've completed a thorough review of the social cards implementation. Here's my detailed feedback: Todo List:
🎯 Code Quality & Best PracticesExcellent implementation overall! The code follows Next.js 14+ conventions and demonstrates good architectural decisions: ✅ Proper Next.js conventions: Uses 🐛 Potential IssuesMinor Issues:
Suggestions:// In opengraph-image.tsx, line 52-54
<div style={{ fontSize: 30, color: '#94a3b8', maxWidth: 880 }}>
{siteConfig.description} {/* Use config instead of hard-coded text */}
</div>🔒 Security Considerations✅ No security concerns identified:
⚡ Performance ConsiderationsGenerally good, with one optimization opportunity: ✅ Efficient: Static exports for image dimensions and metadata Suggestion: Consider adding 📝 Implementation QualityStrengths:
Architecture decisions:
🧪 Test Coverage
📋 Minor Code Quality Suggestions
✅ SummaryThis is a high-quality implementation that properly adds social sharing functionality to the Next.js app. The code follows best practices, has good separation of concerns, and uses appropriate Next.js APIs. Main recommendations:
Overall: ✅ Approved - Ready to merge with minor fixes suggested above. |
Replaces #116, which GitHub auto-closed when its stacked base branch (#105) was deleted on merge. Same change, retargeted to
dev.Summary
Adds Open Graph + Twitter card tags to every public page and a branded default share image.
next/og(app/opengraph-image.tsx), reused for Twitter.buildMetadata()helper emitting consistent title/description/canonical + OG/Twitter objects.Closes #106