Open tyaga001 opened 6 days ago
Add proper social media card support for both the main site and blog posts to improve sharing experience across platforms (Twitter, LinkedIn, Facebook, etc.).
interface OpenGraphMetadata { title: string; description: string; url: string; siteName: string; images: Array<{ url: string; width: number; height: number; alt: string; }>; type: 'website' | 'article'; locale: string; } // Next.js Metadata Configuration export const metadata = { metadataBase: new URL('https://devtoolsacademy.com'), openGraph: { type: 'website', locale: 'en_US', url: 'https://devtoolsacademy.com', siteName: 'DevTools Academy', images: [{ url: '/og-image.jpg', width: 1200, height: 630, alt: 'DevTools Academy' }] }, twitter: { card: 'summary_large_image', site: '@devtoolsacademy', creator: '@devtoolsacademy' } };
interface SocialCardProps { title: string; description?: string; type: 'blog' | 'main' | 'comparison'; imageUrl?: string; }
// Blog post metadata export async function generateMetadata({ params }: Props): Promise<Metadata> { const post = await getPost(params.slug); return { title: post.title, description: post.excerpt, openGraph: { title: post.title, description: post.excerpt, type: 'article', publishedTime: post.publishedAt, authors: [post.author], images: [{ url: `/api/og?title=${encodeURIComponent(post.title)}`, width: 1200, height: 630, alt: post.title }] } }; }
Priority: High
Overview
Add proper social media card support for both the main site and blog posts to improve sharing experience across platforms (Twitter, LinkedIn, Facebook, etc.).
Current Issues
Technical Implementation
1. OpenGraph Metadata Setup
2. Dynamic Image Generation
Implementation Steps
1. Base Setup
2. Dynamic Generation
3. Blog Post Integration
4. Testing & Validation
Technical Requirements
Image Specifications
Metadata Implementation
Acceptance Criteria
Testing Tools
Resources
Priority: High