next-metav0.5.0
On this page
  1. Entry points
  2. Common configuration
  3. Adapter boundaries
  4. Deprecated aliases

API reference

Focused entry points, public helpers, and metadata configuration at a glance.

Entry points

ImportExportsIntended use
next-metaExisting component API and typesBackward-compatible Pages Router usage
next-meta/pagesMetaProvider, PageMeta, MetaContextPages Router
next-meta/appdefineMeta, toMetadata, toViewport, core helpersServer-only native metadata
next-meta/coredefineMeta, normalizeMeta, mergeMeta, resolveMeta, getAbsoluteUrlRouter-neutral configuration

Common configuration

FieldPurpose
titlePage title; native title objects are App Router-only
descriptionStandard and social fallback description
baseUrlAbsolute base for relative metadata URLs
canonicalCanonical document URL
urlOpen Graph document URL
siteNameOpen Graph site name and Pages Router title suffix
locale, localeAlternatesOpen Graph locale and alternates
imagesImage strings/descriptors or { items, mode }
audio, videosMedia descriptor arrays
twitterCard, account, title, description, image, app/player configuration
composeMetaBoolean or per-field repeatable composition policies
typeOpen Graph content type
additionalMetaTagsPages Router custom tags

Adapter boundaries

The App Router adapter maps common social fields, article, book, profile, music, and video types, Twitter summary/app/player cards, and Pinterest verification. Unsupported Open Graph types throw unless a native openGraph object replaces the mapping.

Native Twitter player metadata requires player and stream URLs and positive width/height. Legacy product, payment, location, and arbitrary custom tags are Pages-only; use supported native fields through native for App Router needs.

toMetadata(config, { defaults, parent, native }) applies native top-level fields last. toViewport(config, defaults) returns a separate native Viewport object.

Deprecated aliases

Legacy singular fields such as imageUrl, image, audioUrl, and videoUrl remain normalized for compatibility. Prefer images, audio, and videos in new code. SiteMetaProps is an alias for PageMetaProps; debug has no effect.

The source types remain the exhaustive reference for specialized metadata fields.

By

Commune Software