harlan-zw / zhead

All of the TypeScript definitions for <head>.

Home Page:https://zhead.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why not including the `twitter:url` meta tag in the meta tag list ?

salimabsi opened this issue · comments

Details

Discussion:

if twitter:url is not present, Twitter may use og:url ? what if I don't want to include og:url or want to use different url for twitter ?
I'm not sure whether this is intented or that tag is missing

I would love to submit a fix if that is a bug

Hey @salimabsi, thanks for the issue!

Do you have the right repo for this though? zhead aims to just be types for the head input, it doesn't make any assumptions on what tags you're using.

If you're issue is for unhead, then you can just include a twitter:image and it will override the og:image. It's a good idea to always have an og:image.

Hey @harlan-zw, thanks for your response!

I'm using useSeoMeta from @vueuse/head which uses the this repo's types under the hood, sepcifically MetaFlat, and there is no type for twitterUrl.

I don't think Twitter uses twitter:url, this is probably why it doesn't have a type, see the list of supported meta tags here: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup

If you have a reference of them using it then I'm happy to add it.

I don't really understand why you'd use a different url for twitter generally though. The og:url is mainly for canonical urls as far as I understand it.

That is correct, so I should only use og:url.

Thanks for helping!