-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Feature to allow duplication of explicitly specified meta tags #4656
Comments
Does this duplicate #3705? |
How is it going? I really need a feature like this. |
timneutkens
added a commit
that referenced
this issue
Dec 3, 2018
Fixes #3705 Fixes #4656 - No longer automatically dedupe certain tags. Only the ones we know are *never* going to be duplicate like charSet, title etc. - Fix `key=""` behavior, making sure that if a unique key is provided tags are deduped based on that. For example: ```jsx <meta property='fb:pages' content='one'> <meta property='fb:pages' content='two'> ``` Would currently cause ```jsx <meta property='fb:pages' content='two'> ``` ### After this change: ```jsx <meta property='fb:pages' content='one'> <meta property='fb:pages' content='two'> ``` Then if you use next/head multiple times / want to be able to override: ```jsx <meta property='fb:pages' content='one' key="not-unique-key"> <meta property='fb:pages' content='two' key="not-unique-key"> ``` Would cause: ```jsx <meta property='fb:pages' content='two'> ``` As `key` gets deduped correctly after this PR, similar to how React itself works.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature request
Is your feature request related to a problem? Please describe.
In some use cases, we have to set meta tags with the same name (See #4407 for an actual example of use case) . However, you cannot do that because of
next/head
's duplication-filter feature.Although, thanks to #4121, in the latest version of Next.js you can set multiple
article:tag
meta tag as long as they have unique keys, the tag name is hard-coded and you seem to have no way to add other meta tags toALLOWED_DUPLICATES
.Describe the solution you'd like
It would be great if users can explicitly specify meta tag names to be allowed (e.g. by configuring
next.config.js
) .Describe alternatives you've considered
Provide a way of whatever allow duplication (like specifying by environment variables) .
Additional context
We are willing to send you a pull-request if the above concept is acceptable.
The text was updated successfully, but these errors were encountered: