Metadata API

The Next.js way to set a page's title, description, OpenGraph and other head tags by exporting a metadata object or generateMetadata function.

In more detail

Layouts and pages can both export metadata; child values are merged over parent ones. Next.js turns them into the right meta and link tags in the document head.

Example

export const metadata = { title: 'Pricing', description: 'Plans and prices' };

Related terms

Taught in

References