From 8ad6cf1d3b247407b6771d117370cfa364b0a988 Mon Sep 17 00:00:00 2001 From: Zeeshan Adil Date: Thu, 12 Nov 2026 18:05:03 +0500 Subject: [PATCH] fix(seo): restore the share image on the DSOC pages Setting only the address in openGraph replaced the whole object, so /dsoc/projects lost its og:image in the previous change. Both DSOC layouts now use the shared helper, which fills the address, title, description and image together. --- app/dsoc/layout.tsx | 7 ++++--- app/dsoc/projects/layout.tsx | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/dsoc/layout.tsx b/app/dsoc/layout.tsx index bacd212..8a93332 100644 --- a/app/dsoc/layout.tsx +++ b/app/dsoc/layout.tsx @@ -1,15 +1,16 @@ import type { Metadata } from "next" import type { ReactNode } from "react" +import { withSocial } from "@/lib/seo" + // No canonical here on purpose: this layout wraps every /dsoc route, and a // canonical set here would point all of them at the same address. -export const metadata: Metadata = { +export const metadata: Metadata = withSocial({ title: "DSOC: Dev Weekends Summer of Code", description: "Dev Weekends Summer of Code (DSOC) is a mentored open source program with a monthly stipend per milestone. 2026 applications are closed.", alternates: { canonical: "/dsoc" }, - openGraph: { url: "/dsoc" }, -} +}) export default function DsocLayout({ children }: { children: ReactNode }) { return children diff --git a/app/dsoc/projects/layout.tsx b/app/dsoc/projects/layout.tsx index a492964..2f82ce1 100644 --- a/app/dsoc/projects/layout.tsx +++ b/app/dsoc/projects/layout.tsx @@ -1,13 +1,16 @@ import type { Metadata } from "next" import type { ReactNode } from "react" -export const metadata: Metadata = { +import { withSocial } from "@/lib/seo" + +// withSocial fills the share tags, including the share image, which a bare +// openGraph object here would drop +export const metadata: Metadata = withSocial({ title: { absolute: "DSOC projects | Dev Weekends" }, description: "Open source projects in Dev Weekends Summer of Code: what each one builds, the skills it needs and the mentors who guide it.", alternates: { canonical: "/dsoc/projects" }, - openGraph: { url: "/dsoc/projects" }, -} +}) export default function DsocProjectsLayout({ children }: { children: ReactNode }) { return children