fix: add canonical URL for blog posts

This commit is contained in:
Dorian Niemiec 2024-11-25 08:47:58 +01:00
parent 7866a5c68f
commit 018bbd5592

View file

@ -70,6 +70,9 @@ export async function generateMetadata(props: {
return { return {
title: `${data.title} - SVR.JS`, title: `${data.title} - SVR.JS`,
description: data.smallDescription, description: data.smallDescription,
alternates: {
canonical: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/blog/${data.currentSlug}`
},
openGraph: { openGraph: {
title: `${data.title} - SVR.JS`, title: `${data.title} - SVR.JS`,
description: data.smallDescription, description: data.smallDescription,