fix: add Open Graph and Twitter Card metadata - closes #2698 - #2699
Draft
github-actions[bot] wants to merge 1 commit into
Draft
fix: add Open Graph and Twitter Card metadata - closes #2698#2699github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…2698 Phase 1 of fixing missing OG metadata: - Add metadataBase, default openGraph, and twitter to app/layout.tsx so every route inherits OG title, description, image, and Twitter card - Override openGraph/twitter per-page in app/[filename]/page.tsx for both rule pages (type: article) and category pages (type: website) - Import siteDescription, siteTitle, social from site-config for DRY defaults Note: public/og-image.jpg (1200x630) must be added before the OG image renders. See Phase 1 task checklist in #2698. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6 tasks
8 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements Phase 1 of the Open Graph metadata fix from #2698. Every SSW Rules page previously emitted zero OG/Twitter meta tags — this PR wires up the full set using Next.js's
MetadataAPI.Changes
app/layout.tsxmetadataBase: new URL(siteUrl)so Next.js can resolve relative image URLs correctlyopenGraphblock:title,description,url,siteName,type: "website", and a default image at${siteUrl}/og-image.jpgtwitterblock:card: "summary_large_image",site,creator(fromsocial.twitterinsite-config)siteDescription,siteTitle, andsocialfrom@/site-configto keep values DRYapp/[filename]/page.tsxgenerateMetadata()to includeopenGraphandtwitteroverrides for each page type:type: "website", page-specific title, description, and canonical URLtype: "article", page-specific title, description, and canonical URLseoDescription→ body preview → site defaultThe metadata references
public/og-image.jpg(resolves to `(www.ssw.com.au/redacted) This file does not yet exist — it needs to be created as a 1200×630 JPEG by the design team. Until then, social previews will show the OG title/description but the image will be broken.This matches the Phase 1 task checklist in #2698:
metadataBaseand defaultopenGraph+twittertoapp/layout.tsxopenGraphin thegenerateMetadata()functions (rules + categories)public/og-image.jpgRelated Issues