Description
Sharing a ByteChain Academy course URL on Telegram or Twitter shows a blank preview with no title, description, or image. Adding Open Graph meta tags to course and profile pages will drive organic growth through peer sharing. A ShareButton component will make sharing intentional and easy.
Background
- Next.js App Router supports
generateMetadata for dynamic OG meta tags
- Course detail pages have no OG tags
Metadata API: export async function generateMetadata({ params }) { return { title, openGraph: { title, description, images } } }
Implementation Guide
Add generateMetadata to frontend/app/courses/[id]/page.tsx fetching the course and returning dynamic OG title, description, and image (use course.thumbnailUrl or a default OG image).
Add generateMetadata to frontend/app/learners/[username]/page.tsx (from Issue 45) with username and XP in the OG description.
Create frontend/components/ui/share-button.tsx using the Web Share API (navigator.share()) with a clipboard copy fallback. Apply it to the certificate card (Issue 38) and course detail page.
Create a default OG image at frontend/public/og-default.png with ByteChain Academy name and tagline.
Acceptance Criteria
Complexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org
Description
Sharing a ByteChain Academy course URL on Telegram or Twitter shows a blank preview with no title, description, or image. Adding Open Graph meta tags to course and profile pages will drive organic growth through peer sharing. A
ShareButtoncomponent will make sharing intentional and easy.Background
generateMetadatafor dynamic OG meta tagsMetadataAPI:export async function generateMetadata({ params }) { return { title, openGraph: { title, description, images } } }Implementation Guide
Add
generateMetadatatofrontend/app/courses/[id]/page.tsxfetching the course and returning dynamic OG title, description, and image (usecourse.thumbnailUrlor a default OG image).Add
generateMetadatatofrontend/app/learners/[username]/page.tsx(from Issue 45) with username and XP in the OG description.Create
frontend/components/ui/share-button.tsxusing the Web Share API (navigator.share()) with a clipboard copy fallback. Apply it to the certificate card (Issue 38) and course detail page.Create a default OG image at
frontend/public/og-default.pngwith ByteChain Academy name and tagline.Acceptance Criteria
generateMetadataShareButtoncomponent uses Web Share API with clipboard fallbackpublic/og-default.pngComplexity: High - 200 points
Join: https://t.me/ByteChainAcademy | Contact: contact@nexacore.org