mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
To enable the ability of leveraging current `pathname` and configured `metadataBase` for other canonical like urls, we support those urls with auto resolving with `pathename` and `metadataBase` like canonical url, then you could just configure relative paths like below
```js
openGraph: {
url: './abc', // will be resolved based on pathname and metadata base
},
itunes: {
appId: 'my-app-id'
appArgument: './native-app'
}
```
Fixes #51829
Closes NEXT-1302
11 lines
206 B
TypeScript
11 lines
206 B
TypeScript
export default function page() {
|
|
return 'url'
|
|
}
|
|
|
|
export const metadata = {
|
|
metadataBase: new URL('https://example.com/foo'),
|
|
openGraph: {
|
|
url: new URL('https://outerspace.com/huozhi.png'),
|
|
},
|
|
}
|