#---
1 messages · Page 1 of 1 (latest)
To migrate your next/head code into the new Metadata API in Next.js, you can follow the structure provided in the knowledge sources. Below is the migration of your given next/head code into the new Metadata API format.
import type { Metadata } from 'next'
export const metadata: Metadata = {
title: 'Contiguity',
description: "Communications for what you're building.",
keywords: [
'Contiguity', 'Use Contiguity', 'SMS', 'Text Messaging', 'Email', 'Call',
'SendGrid alternative', 'SMS API', 'email API', 'transactional messaging',
'developer-friendly communications', 'SendGrid alternative', 'bulk SMS',
'email marketing automation', 'cloud communications platform',
'programmable messaging', 'multi-channel messaging',
'application-to-person (A2P) messaging'
],
robots: 'index, follow',
contentType: 'text/html; charset=utf-8',
language: 'English',
revisitAfter: '30 days',
author: 'Contiguity',
openGraph: {
url: 'https://contiguity.co',
title: 'Contiguity',
description: "Communications for what you're building.",
type: 'website',
images: [
{
url: 'https://contiguity.co/assets/icon-white.png',
}
],
locale: 'en_US',
},
twitter: {
card: 'summary_large_image',
title: 'Contiguity',
description: "Communications for what you're building.",
images: [
{
url: 'https://contiguity.co/assets/icon-white.png',
alt: 'Contiguity logo',
}
],
},
icons: {
icon: [
{
url: 'https://contiguity.co/assets/icon-white.png',
sizes: '32x32',
type: 'image/png',
},
{
url: 'https://contiguity.co/assets/icon-white.png',
sizes: '16x16',
type: 'image/png',
},
],
appleTouchIcon: [
{
url: 'https://contiguity.co/assets/icon-black.png',
sizes: '180x180',
},
],
},
}
This code migrates all the metadata from your `next/head` component into the new Metadata API format. You can place this code in your `app/layout.tsx` or `app/page.tsx` file as needed.
For more details, you can refer to the Next.js Metadata API documentation (https://nextjs.org/docs/app/building-your-application/optimizing/metadata).
If you need further customization or additional metadata fields, you can check the Metadata API reference (https://nextjs.org/docs/app/api-reference/functions/generate-metadata#metadata-object).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@fathom valve kapa.ai is still learning and improving, please let us know how it did by reacting below