-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enhance Metadata 'other' API to support property attribute #66996
base: canary
Are you sure you want to change the base?
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
@@ -54,6 +54,6 @@ export function createDefaultMetadata(): ResolvedMetadata { | |||
bookmarks: null, | |||
category: null, | |||
classification: null, | |||
other: {}, | |||
other: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Will the type change from map
to array
create problems for Next.JS developers' previous code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will not affect the previous functionality. I have included test cases for the "other" option, which cover both the previous and the new usage methods.
Any updates on this? |
well I need the custom openGraph, I don't think Facebook metadata works in my case :(
|
Related Feature Request discussion
#57527
What?
Added array support to the
Metadata
other
API, allowing developers to customize the use ofname
orproperty
attributes without affecting existing functionality.Why?
In some cases, developers need to add meta tags with the
property
attribute, such as:or
I couldn't find detailed standard documentation for these attributes online, only some references like Product-Based OG Tag.
Allowing developers to customize the
property
attribute will provide greater flexibility, and is particularly useful for e-commerce product pages, and currently, theother
option only supports thename
attribute.How?
Added an array option to allow developers to customize meta tag attributes without affecting existing functionality.
Current usage will not be affected.
Additional array object support.