CSS-Tricks / coding-fonts

https://coding-fonts.css-tricks.com/
MIT License
460 stars 67 forks source link

added open graph meta tags & twitter specific card data #81

Closed calebnance closed 3 years ago

calebnance commented 3 years ago

This adds Open Graph data and Twitter card specific meta as well: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image

Use case would be when a user shares a direct link to one of these font specific pages: the image preview, font name etc is shared within this summary_large_image twitter card on their tweet.

calebnance commented 3 years ago

i also tried to test the netlify deploy url with twitters validator here: https://cards-dev.twitter.com/validator

But y'alls deploy logic in src/_data/images.js prevents absolute pathing of the image asset unless published on the prod doman: https://coding-fonts.css-tricks.com/

chriscoyier commented 3 years ago

Great addition.

Looks like a little merge conflict with the previous update to the head. Other than that seems good to go. Not terribly worried about the deploy preview for this.

calebnance commented 3 years ago

@chriscoyier forgot to tell you I fixed the merge conflict on this PR too.