fix: generate dynamic metadata for specific blog index pages
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m4s
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m4s
This commit is contained in:
parent
694e632815
commit
912815ae30
1 changed files with 32 additions and 26 deletions
|
@ -8,35 +8,41 @@ import Link from "next/link";
|
||||||
|
|
||||||
export const dynamic = "force-static";
|
export const dynamic = "force-static";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export async function generateMetadata(props: {
|
||||||
title: "Blog - SVR.JS",
|
params: Promise<{ id: string }>;
|
||||||
description:
|
}): Promise<Metadata> {
|
||||||
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
return {
|
||||||
openGraph: {
|
|
||||||
title: "Blog - SVR.JS",
|
title: "Blog - SVR.JS",
|
||||||
description:
|
description:
|
||||||
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
||||||
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog`,
|
openGraph: {
|
||||||
type: "website",
|
title: "Blog - SVR.JS",
|
||||||
images: [
|
description:
|
||||||
{
|
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
||||||
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
|
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/page/${(await props.params).id}`,
|
||||||
width: 800,
|
type: "website",
|
||||||
height: 600,
|
images: [
|
||||||
alt: "Blog - SVR.JS"
|
{
|
||||||
}
|
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
|
||||||
]
|
width: 800,
|
||||||
},
|
height: 600,
|
||||||
twitter: {
|
alt: "Blog - SVR.JS"
|
||||||
card: "summary_large_image",
|
}
|
||||||
site: "@SVR_JS",
|
]
|
||||||
title: "Blog - SVR.JS",
|
},
|
||||||
description:
|
twitter: {
|
||||||
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
card: "summary_large_image",
|
||||||
images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`],
|
site: "@SVR_JS",
|
||||||
creator: "@SVR_JS"
|
title: "Blog - SVR.JS",
|
||||||
}
|
description:
|
||||||
};
|
"Welcome to the SVR.JS Blog! Explore our latest blog posts featuring web development, web application security, and web server administration tips. Stay tuned for the latest SVR.JS updates.",
|
||||||
|
images: [
|
||||||
|
`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`
|
||||||
|
],
|
||||||
|
creator: "@SVR_JS"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const BlogPage = async (props: { params: Promise<{ id: string }> }) => {
|
const BlogPage = async (props: { params: Promise<{ id: string }> }) => {
|
||||||
const params = await props.params;
|
const params = await props.params;
|
||||||
|
|
Loading…
Reference in a new issue