Metadata is setup correctly in root layout.tsx
and did not overwritten by page or any other layout, but there is unable to visualize it by browser, og checker like opengraph.xyz
and even vercel itself. The metadata is successfully compiled and able to see them in head tag but unable to reconised.
This is only happens for /
page only other remains pages having issue.
Code configuration
// layout.tsx
export const metadata: Metadata = {
title: {
default: siteConfig.shortDescription,
template: `%s | ${siteConfig.name}`,
absolute: siteConfig.notFoundText,
},
metadataBase: new URL(siteConfig.url),
description: siteConfig.description,
applicationName: siteConfig.name,
icons: { icon: "/favicon.ico", apple: "/logo-192x192.png" },
authors: [{ name: "Shyam Verma", url: siteConfig.url }],
category: "Information & Technology",
creator: siteConfig.name,
keywords: siteConfig.keywords,
openGraph: {
locale: "en_US",
type: "website",
title: siteConfig.shortDescription,
url: siteConfig.url,
siteName: siteConfig.name,
description: siteConfig.description,
images: [
{
url: `${siteConfig.url}/og.png`,
width: 1200,
height: 628,
alt: siteConfig.shortDescription,
secureUrl: siteConfig.url,
},
],
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
images: [`${siteConfig.url}/og.png`],
creator: "@coderrshyam",
site: siteConfig.url,
},
appleWebApp: {
capable: true,
statusBarStyle: "black-translucent",
title: siteConfig.name,
},
manifest: "/manifest.json",
};
// site.ts
export const siteURL =
process.env.NODE_ENV === "production" ? "https://www.coderrshyam.tech" : "http://localhost:3000";
export const notFoundText = "404: This page could not be found.";
export const siteName = "CoderrShyam";
export const siteDescription =
"I am Shyam Verma, a full stack web developer & a web designer also.";
export const siteShortDescription = "CoderrShyam - A Professional Web Developer";
export const siteConfig = {
name: siteName,
description: siteDescription,
url: siteURL,
shortDescription: siteShortDescription,
notFoundText,
keywords: [
"coderrshyam",
"shyam verma",
"web developer",
"web designer",
"full stack developer",
"next.js",
"react",
"node.js",
"express.js",
"mongodb",
"tailwind css",
"typescript",
"javascript",
"html",
"css",
"web development",
"web design",
],
};
Framework: Next.js 15.3.1
URL: https://www.coderrshyam.tech
I had also asked this issue from v0
but i am not able to resolve it.
Please help!
Thanku.