SEO

It's important to include the right metadata tags information for each page. The most common are title and description, but you can customize the open graph preview image, and the social network cards.

The layout.tsx page already contains default metadata, taking data from the config.ts file.

src/app/layout.tsx
export const metadata: Metadata = {
  ...getSEOTags({
    metadataBase: new URL(websiteUrl),
    title: landingPageTitle,
    description: landingPageDescription,
  }),
  ...getOpenGraph({
    title: landingPageTitle,
    description: landingPageDescription,
    imageUrl: openGraphImageUrl,
    websiteUrl,
    twitterImageUrl: openGraphImageUrl,
    twitterHandle: "",
    twitterMakerHandle: "",
  }),
};

You can override the default meta tags, by exporting a metadata object in a pages.tsx file.

Last updated