The Next.js Metadata API
Pages and layouts export a static metadata object or an async generateMetadata function to declare title, description, Open Graph, and icon tags; Next.js merges exports down the segment tree with deeper segments overriding shallower ones and renders the result into head. Because generation runs on the server, dynamic metadata can await the same data the page uses without client-side flicker.
This Concept is waiting for its first lesson!
Pages and layouts export a static metadata object or an async generateMetadata function to declare title, description, Open Graph, and icon tags; Next.js merges exports down the segment tree with deeper segments overriding shallower ones and renders the result into head. Because generation runs on the server, dynamic metadata can await the same data the page uses without client-side flicker.
Are you a teacher? Sign in to start contributing.
Sign In