-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static og and twitter image files as metadata (#45797)
## Feature Closes NEXT-265 Fixes NEXT-516 - [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)
- Loading branch information
Showing
17 changed files
with
213 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// TODO-APP: check if this can be narrowed. | ||
export type ComponentModule = () => any | ||
export type ModuleReference = [ | ||
componentModule: ComponentModule, | ||
filePath: string | ||
] | ||
|
||
// Contain the collecting image module paths | ||
export type CollectingMetadata = { | ||
icon: string[] | ||
apple: string[] | ||
twitter: string[] | ||
opengraph: string[] | ||
} | ||
|
||
// Contain the collecting evaluated image module | ||
export type CollectedMetadata = { | ||
icon: ComponentModule[] | ||
apple: ComponentModule[] | ||
twitter: ComponentModule[] | null | ||
opengraph: ComponentModule[] | null | ||
} | ||
|
||
export type MetadataImageModule = { | ||
url: string | ||
type?: string | ||
} & ( | ||
| { sizes?: string } | ||
| { | ||
width?: number | ||
height?: number | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.