mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
When resolving opengraph / twitter images, we currently ignore the configured `metadataBase` value, which goes against the [documentation](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value) and doesn't seem correct, since an explicit `metadataBase` should be preferred over a fallback. This updates the handling to ensure an explicit `metadataBase` takes priority over the implicit path discovery. The one remaining special case here is for the "static metadata" case, aka the `opengraph-image` convention. We'll continue to prefer the fallback `metadataBase` in preview Vercel deploys & locally. Fixes #66957 Closes NDX-260
10 lines
145 B
JavaScript
10 lines
145 B
JavaScript
export default function Page() {
|
|
return <div>Hello World</div>
|
|
}
|
|
|
|
export const metadata = {
|
|
openGraph: {
|
|
images: '/og-image.png',
|
|
},
|
|
}
|