From 6f3918cd66b6475236b5485cbc4d5b02b35b1e4c Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Mon, 23 Feb 2026 02:51:09 +0500 Subject: [PATCH 1/6] Create layout.tsx --- src/app/projects/layout.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/app/projects/layout.tsx diff --git a/src/app/projects/layout.tsx b/src/app/projects/layout.tsx new file mode 100644 index 00000000..fecfbe63 --- /dev/null +++ b/src/app/projects/layout.tsx @@ -0,0 +1,25 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Projects - Umair Jibran", + description: "Explore my portfolio of software projects, full-stack applications, and technical solutions.", + openGraph: { + type: "website", + title: "Projects - Umair Jibran", + description: "Explore my portfolio of software projects, full-stack applications, and technical solutions.", + url: "/projects", + }, + twitter: { + card: "summary_large_image", + title: "Projects - Umair Jibran", + description: "Explore my portfolio of software projects, full-stack applications, and technical solutions.", + }, +}; + +export default function ProjectsLayout({ + children, +}: { + children: React.ReactNode; +}) { + return children; +} From b5cad217199bee81f9d461f2075af25e276e3850 Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Mon, 23 Feb 2026 02:51:22 +0500 Subject: [PATCH 2/6] Add generateMetadata for story pages --- src/app/writing/[slug]/page.tsx | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/src/app/writing/[slug]/page.tsx b/src/app/writing/[slug]/page.tsx index b62fab17..d60f0dd7 100644 --- a/src/app/writing/[slug]/page.tsx +++ b/src/app/writing/[slug]/page.tsx @@ -5,6 +5,56 @@ import { StoryBody } from "@/components/StoryBody"; import { RelatedStories } from "@/components/RelatedStories"; import { Calendar, ArrowLeft } from "lucide-react"; import Link from "next/link"; +import type { Metadata } from "next"; + +export async function generateMetadata({ params }: { params: { slug: string } }): Promise { + const allStories = [ + ...getAllBlog(), + ...getAllCaseStudies() + ]; + + const story = allStories.find(story => story.slug === params.slug); + + if (!story) { + return {}; + } + + return { + title: story.title, + description: story.excerpt, + authors: story.author ? [{ name: story.author.name }] : undefined, + openGraph: { + type: "article", + title: story.title, + description: story.excerpt, + url: `/writing/${story.slug}`, + publishedTime: story.date, + authors: story.author ? [story.author.name] : undefined, + tags: story.tags, + images: story.ogImage?.url ? [ + { + url: story.ogImage.url, + width: 1200, + height: 630, + alt: story.title, + } + ] : story.coverImage ? [ + { + url: story.coverImage, + width: 1200, + height: 630, + alt: story.title, + } + ] : undefined, + }, + twitter: { + card: "summary_large_image", + title: story.title, + description: story.excerpt, + images: story.ogImage?.url || story.coverImage, + }, + }; +} export default async function StoryPage({ params }: { params: { slug: string } }) { const allStories = [ From ac8221312bb45e7e2d1024fd30a7a2d8c38447a4 Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Mon, 23 Feb 2026 02:51:30 +0500 Subject: [PATCH 3/6] Add metadata for Writing page --- src/app/writing/page.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app/writing/page.tsx b/src/app/writing/page.tsx index 49431e31..ca4bc791 100644 --- a/src/app/writing/page.tsx +++ b/src/app/writing/page.tsx @@ -2,6 +2,23 @@ import { MoreStories } from "@/components/MoreStories"; import { getAllBlog, getAllCaseStudies } from "@/lib/api"; import Link from "next/link"; import { Rss, Linkedin, PenTool } from "lucide-react"; +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Writing - Umair Jibran", + description: "Technical articles, blog posts, and case studies about software engineering, web development, and the technical challenges I encounter.", + openGraph: { + type: "website", + title: "Writing - Umair Jibran", + description: "Technical articles, blog posts, and case studies about software engineering, web development, and the technical challenges I encounter.", + url: "/writing", + }, + twitter: { + card: "summary_large_image", + title: "Writing - Umair Jibran", + description: "Technical articles, blog posts, and case studies about software engineering, web development, and the technical challenges I encounter.", + }, +}; export default function Index() { // Combine and sort all content From 8aaf0e54f15340f8c16a9ebddd8783b64255c243 Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Tue, 24 Feb 2026 10:15:30 +0500 Subject: [PATCH 4/6] Update src/app/writing/[slug]/page.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/app/writing/[slug]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/writing/[slug]/page.tsx b/src/app/writing/[slug]/page.tsx index d60f0dd7..e2d58a31 100644 --- a/src/app/writing/[slug]/page.tsx +++ b/src/app/writing/[slug]/page.tsx @@ -16,7 +16,7 @@ export async function generateMetadata({ params }: { params: { slug: string } }) const story = allStories.find(story => story.slug === params.slug); if (!story) { - return {}; + notFound(); } return { From a3d7710b0f110ddb805c761e3d54ab6718f0bf3f Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Tue, 24 Feb 2026 10:16:20 +0500 Subject: [PATCH 5/6] Update src/app/writing/page.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/app/writing/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/writing/page.tsx b/src/app/writing/page.tsx index ca4bc791..353507fd 100644 --- a/src/app/writing/page.tsx +++ b/src/app/writing/page.tsx @@ -14,7 +14,7 @@ export const metadata: Metadata = { url: "/writing", }, twitter: { - card: "summary_large_image", + card: "summary", title: "Writing - Umair Jibran", description: "Technical articles, blog posts, and case studies about software engineering, web development, and the technical challenges I encounter.", }, From 2305ba72f8bdff5f3fc3cf258c691c9297409872 Mon Sep 17 00:00:00 2001 From: Umair Jibran Date: Tue, 24 Feb 2026 10:16:30 +0500 Subject: [PATCH 6/6] Update src/app/projects/layout.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/app/projects/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/projects/layout.tsx b/src/app/projects/layout.tsx index fecfbe63..8115c6b9 100644 --- a/src/app/projects/layout.tsx +++ b/src/app/projects/layout.tsx @@ -10,7 +10,7 @@ export const metadata: Metadata = { url: "/projects", }, twitter: { - card: "summary_large_image", + card: "summary", title: "Projects - Umair Jibran", description: "Explore my portfolio of software projects, full-stack applications, and technical solutions.", },