mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## Feature For property that needs to be resolved as URL, compose with `metadataBase` if it's provided Closes NEXT-398 ### Detail updates * fix issue that path having extra `/` in the middle for pages path under app dir * don't render Meta if value is empty string, e.g. `og:title` can be `''` from value of `title.absolute` * did some refactor to separate resolvers into different files * add some unit tests for resolve urls - [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [x] Related issues linked using `fixes #number` - [x] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) --------- Co-authored-by: Shu Ding <[email protected]>
11 lines
178 B
TypeScript
11 lines
178 B
TypeScript
export default function page() {
|
|
return 'url'
|
|
}
|
|
|
|
export const metadata = {
|
|
metadataBase: new URL('https://bar.example/url'),
|
|
alternates: {
|
|
canonical: 'subpath',
|
|
},
|
|
}
|