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,7 +8,10 @@ import Link from "next/link";
|
||||||
|
|
||||||
export const dynamic = "force-static";
|
export const dynamic = "force-static";
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export async function generateMetadata(props: {
|
||||||
|
params: Promise<{ id: string }>;
|
||||||
|
}): Promise<Metadata> {
|
||||||
|
return {
|
||||||
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.",
|
||||||
|
@ -16,7 +19,7 @@ export const metadata: Metadata = {
|
||||||
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`,
|
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/page/${(await props.params).id}`,
|
||||||
type: "website",
|
type: "website",
|
||||||
images: [
|
images: [
|
||||||
{
|
{
|
||||||
|
@ -33,10 +36,13 @@ export const metadata: Metadata = {
|
||||||
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.",
|
||||||
images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`],
|
images: [
|
||||||
|
`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`
|
||||||
|
],
|
||||||
creator: "@SVR_JS"
|
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