-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
override head tags on indivisual page #975
Comments
Added a de-duplication strategy in #976.
Took this from 0.x code. We had a As for the feature request part, we are tracking it at #551. (#588 is a possible implementation, it needs rewrite though.) |
@brc-dd Thank you for the quick fix! |
Limited it to |
Sounds good to me 👍 Thank you again. |
Is your feature request related to a problem? Please describe.
Vite sets OGP tags globally by
.vitepress/config.ts
.But we want to override OGP tags for some indivisual pages (for example, Vite 3 release post).
Now we set those by frontmatter and actually seems to work.
Though the tags are duplicated like this:
The OGP spec does not mention anything when a multiple tags existed. So I think this behavior is implementation dependent.
Describe the solution you'd like
Give a way to declare that a head tag should only exist once on config.
But we need to consider what tags should be treated as same. For example,
<meta property="og:title" content="foo" >
and<meta property="og:title" content="bar" >
are same, when tag name and the value ofproperty
attribute is same.Describe alternatives you've considered
Give a way to declare that a head tag should override it on frontmatter.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: