mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
bbec971d8f
* fix(app-router): hoist streamed metadata into <head> instead of body Async generateMetadata was serialized via dangerouslySetInnerHTML into a hidden <div> in the body, which React cannot hoist. For JS-capable clients (browsers, Googlebot) the tags stayed in <body>, where Google ignores rel=canonical, hreflang and robots. Render the resolved metadata as real <title>/<meta>/<link> elements through MetadataHead so React 19 hoists them into <head>, matching Next.js. Remove the now-unused renderMetadataToHtml string serializer. * Fix tests * fix(app-router): harden metadata hoisting coverage * fix(app-router): restore streamed metadata placement * fix(app-router): preserve static metadata placement --------- Co-authored-by: James <james@eli.cx>