From 1a26ea2947cd2372c0984709e532a9756730f446 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:15:08 +0200 Subject: [PATCH] fix(meta): point the social preview at a host that resolves metadataBase was hardcoded to https://printcraft.app, which does not serve this app. The generated card was therefore advertised as https://printcraft.app/opengraph-image and returned 404, so every shared link rendered as a blank rectangle even though the site does generate a real image. Now reads NEXT_PUBLIC_SITE_URL with the actual serving host as the fallback. Applied to both app/src/app/layout.tsx (the tree CI builds) and the identical copy at src/app/layout.tsx, so the stale duplicate cannot re-introduce the dead domain for whoever reads it next. --- app/src/app/layout.tsx | 5 ++++- src/app/layout.tsx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/app/layout.tsx b/app/src/app/layout.tsx index d536dd8..08771f7 100644 --- a/app/src/app/layout.tsx +++ b/app/src/app/layout.tsx @@ -18,7 +18,10 @@ const geistMono = Geist_Mono({ export const metadata: Metadata = { title: "PrintCraft — Scene Composer for Physical Art", description: "Turn separate photos of real people into one unified artwork — printed on surfaces that matter.", - metadataBase: new URL("https://printcraft.app"), + // Where the site ACTUALLY serves. printcraft.app does not serve this app, so + // the generated og:image resolved to https://printcraft.app/opengraph-image + // and 404'd — the preview was advertised and discarded by every scraper. + metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://printcraft.orangecat.ch"), openGraph: { title: "PrintCraft — Scene Composer for Physical Art", description: "Turn separate photos of real people into one unified artwork — printed on surfaces that matter.", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d536dd8..65883af 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -18,7 +18,10 @@ const geistMono = Geist_Mono({ export const metadata: Metadata = { title: "PrintCraft — Scene Composer for Physical Art", description: "Turn separate photos of real people into one unified artwork — printed on surfaces that matter.", - metadataBase: new URL("https://printcraft.app"), + // Kept in step with app/src/app/layout.tsx, which is the tree CI builds. + // printcraft.app does not serve this app, so the generated og:image resolved + // to a 404 and every social scraper discarded the preview. + metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || "https://printcraft.orangecat.ch"), openGraph: { title: "PrintCraft — Scene Composer for Physical Art", description: "Turn separate photos of real people into one unified artwork — printed on surfaces that matter.",