diff --git a/src/app/[locale]/contact/page.tsx b/src/app/[locale]/contact/page.tsx index 562f15c..1de6a0c 100644 --- a/src/app/[locale]/contact/page.tsx +++ b/src/app/[locale]/contact/page.tsx @@ -11,7 +11,7 @@ import social from '@/lib/social.json' import { contactHeading, contactList } from './styles.css' -export const metadata = getMetadata(() => ({ +export const generateMetadata = getMetadata(() => ({ title: 'Contact', description: 'Social links and contact information for César Guadarrama', alternates: { canonical: `/contact` }, diff --git a/src/app/[locale]/projects/page.tsx b/src/app/[locale]/projects/page.tsx index 951d0f1..ca70a49 100644 --- a/src/app/[locale]/projects/page.tsx +++ b/src/app/[locale]/projects/page.tsx @@ -26,7 +26,7 @@ import { projectTechnologyItem, } from '../blog/styles.css' -export const metadata = getMetadata(() => ({ +export const generateMetadata = getMetadata(() => ({ title: 'Projects', description: 'Software engineering projects, websites, web apps, native apps for iOS and Android and more', diff --git a/src/lib/metadata.ts b/src/lib/metadata.ts index a62db31..a6ba025 100644 --- a/src/lib/metadata.ts +++ b/src/lib/metadata.ts @@ -100,7 +100,7 @@ export function getMetadata( }, alternates: { ...props.alternates, - canonical: `${host}/${pageProps.params.locale}/${props.alternates?.canonical?.toString() ?? ''}`, + canonical: `${host}/${pageProps.params?.locale}/${props.alternates?.canonical?.toString() ?? ''}`, }, } }