jekyll / jekyll-seo-tag

A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
https://jekyll.github.io/jekyll-seo-tag
MIT License
1.66k stars 294 forks source link

Added the `twitter:description` tag #464

Closed amirmasoudabdol closed 2 years ago

amirmasoudabdol commented 2 years ago

I think we are missing the twitter:description tag, right?

mattr- commented 2 years ago

Does twitter not use the opengraph tag?

amirmasoudabdol commented 2 years ago

I think it doesn't, but I cannot really be sure. I have noticed that if I don't include the twitter:description sometimes the description is missing when I share the article on Twitter! 🤷🏻‍♂️

mattr- commented 2 years ago

Could you update the tests to include this new tag? You should be able to modify some already existing tests. Once that's done, this should be good to merge. Thanks!

amirmasoudabdol commented 2 years ago

I have absolutely no idea how Ruby's tests work, but I think I did something! 😅

mattr- commented 2 years ago

I have absolutely no idea how Ruby's tests work, but I think I did something! 😅

You did great! Let's see how CI goes. 😁

pathawks commented 2 years ago

When the Twitter card processor looks for tags on a page, it first checks for the Twitter-specific property, and if not present, falls back to the supported Open Graph property. This allows for both to be defined on the page independently, and minimizes the amount of duplicate markup required to describe content and experience.

https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#opengraph

Reading the documentation, I assumed it would use the existing og:description. I wonder if there is some other reason why the description sometimes does not appear.

amirmasoudabdol commented 2 years ago

I cannot really tell, but it should be fine if we provide an extra tag for twitter as well, right?

mattr- commented 2 years ago

I think it's fine to include the twitter tag here. It would be nice if twitter would reliably use og:description but that doesn't seem to be the case. I'm also open to including other platform specific tags for large enough platforms.

mattr- commented 2 years ago

@jekyllbot: merge +minor