85033e3add
Metadata API should provide a way to override the filebased metadata images. As usually for child routes, if there's new social images or icons are provided, the ones from parent routes should be overridden / skipped. The `metadata` object export or `generateMetadata` should be able to do that. Sometimes users still add other og info (besides images) to metadata export (both object and `generateMetadata`). I think we should check if they really have returned images property, then decide to override. - For the same level of routes: - If there's no `openGraph.images` in the returned value, merge with file based images - If there's any `openGraph.images` in the returned value, ignore file based ones - For child level of routes: Always override the parent level, ignoring parent level file based images unless they use `generateMetadata` to merge from `resolvingParentMetadata` value, then the parent level's file based ones will present there Closes NEXT-1418 |
||
---|---|---|
.. | ||
app | ||
pages/blog | ||
metadata.test.ts | ||
next.config.js |