From dc1b4c8e0f1c9ee71be809076a0b5c361b5dcfc2 Mon Sep 17 00:00:00 2001 From: Nichole Frey Date: Sat, 17 Feb 2024 19:28:01 -0500 Subject: [PATCH] Add open graph image to seo metadata --- src/app/layout.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 705f736..9dd602e 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import { Metadata } from 'next'; import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter'; +import { getCldOgImageUrl } from 'next-cloudinary'; import AppLayout from '@/components/AppLayout'; @@ -11,7 +12,8 @@ export const metadata: Metadata = { // a default is required when creating a template default: 'Nichole Frey', }, - description: 'Full-Stack Web Developer located in Central Florida', + description: + 'Portfolio website for Nichole Frey, a Full-Stack Developer based in Orlando, FL', generator: 'Next.js', applicationName: 'Nichole Frey | Full-Stack Developer', @@ -28,6 +30,18 @@ export const metadata: Metadata = { authors: [{ name: 'Nichole Frey' }], creator: 'Nichole Frey', publisher: 'Nichole Frey', + openGraph: { + images: [ + { + width: 1200, + height: 627, + url: getCldOgImageUrl({ + src: 'zensite/og-image', + crop: 'scale', + }), + }, + ], + }, }; interface RootLayoutProps {