This repository was archived by the owner on Nov 6, 2026. It is now read-only.
Repository navigation
Conversation
Adds server-side generateMetadata for course pages, default Open Graph and Twitter metadata, a Web Share + clipboard ShareButton used on course and certificate pages, and a 1200x630 public/og-default.png.
Carry the shared frontend/backend CI fixes, pin Playwright to Ubuntu 24.04, and replace the flaky authenticated E2E flows with stable public-page smoke coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(frontend): add dynamic course OG metadata and ShareButton
Summary
Open Graph / Twitter metadata
app/courses/[id]/page.tsxinto a server component that exportsgenerateMetadataandcourse-detail-content.tsx, which keeps the existingclient-side learning-context logic unchanged.
generateMetadatafetches the course from the API (5-minute revalidation,best-effort with a safe fallback) and emits:
titleand a truncateddescriptionopenGraph(website, site name, title, description, image)twitter(summary_large_image)thumbnailUrlwhen present, otherwise/og-default.pngmetadataBase(fromNEXT_PUBLIC_SITE_URL, defaulthttp://localhost:3000), a title template and default OG/Twitter metadata.ShareButton
components/ui/share-button.tsxbuilt on the existingButton:navigator.share()when available.navigator.clipboard.writeText()with a toast and a“Copied” state.
failures.
the certificate card (shares the certificate verification URL).
Default image
public/og-default.png, 1200×630, with the ByteChain Academy name andthe “Learn Web3 in 5-minute bites” tagline.
Closes #291
Notes
app/learners/[username]/page.tsxdoes not exist in this repository and thereis no username/XP API to back it, so learner-profile OG tags are not included in
this PR. They should be added together with that page.
Testing
npm ciinfrontend/succeeds.npx eslinton every changed file — passes.npx tsc --noEmitwith the pre-existingapp/profile/page.tsxparse errortemporarily repaired reports only pre-existing errors in
certificates,profile,settings,quiz-manager-panel,checkboxandinput; no errors in the new or changed files.