Limits
Limits in the Metadata, head and metadata routes guide.
- Pages with
ssr = falseget the document shell with their static metadata (metadata,viewport,links, and the routeheaders). TheirgenerateMetadatadoes not run on the server: it needs the page's data, which such a page does not load there. Put the document defaults in the root layout. generateMetadataruns on the server and on the client, like a loader. Keep secrets out of it; read them in a server function and pass the result through the loader data.- A dynamic
opengraph-image.tsxbelowroutes/is an image of its folder, not a page.generateImageMetadata(several images from one module) is not supported: write oneopengraph-imagemodule per folder (see Dynamic social images). - Google Fonts are fetched at build time through
defineFonts({ google }), and the page serves them frompublic/.