Configuration
Static metadata export
Server layout or page export for known metadata. Do not combine with generateMetadata in the same file. Source: https://nextjs.org/docs/app/api-reference/functions/generate-metadata
Formal Syntax & Structure
nextjs syntaxnextjs
export const metadata: Metadata = { ... }Working Example
Example Snippetnextjs
import type {Metadata} from 'next';export const metadata: Metadata = { metadataBase: new URL('https://books.example'), title:{default:'River Books',template:'%s | River Books'}, description:'An independent catalog of reading guides.'};export default function Layout({children}:{children:React.ReactNode}) { return <html lang='en'><body>{children}</body></html>;}