Skip to content
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

Social Sharing Preview Image + Title #938

Closed
shiffman opened this issue Apr 20, 2024 · 8 comments
Closed

Social Sharing Preview Image + Title #938

shiffman opened this issue Apr 20, 2024 · 8 comments
Assignees
Labels

Comments

@shiffman
Copy link
Member

When a link is shared, each page should include a preview image and the title. Right now, the homepage, for example, has no preview (should use the book mock-up) and the title "Examples":

Screen Shot 2024-04-20 at 10 05 50 AM

See https://thecodingtrain.com for an example system.

@jasongao97
Copy link
Contributor

I added the description of the first 150 characters for each chapter. Would it be preferable for the preview images to be the same as the opening figures for the chapters, or should they all simply feature the book mock-up?

@shiffman
Copy link
Member Author

I think either the physical book mock-up or a nice example screenshot? Don't feel strongly about this, but I think the chapter opening images will be confusing as the primary shared element.

@jasongao97
Copy link
Contributor

I think either the physical book mock-up or a nice example screenshot? Don't feel strongly about this, but I think the chapter opening images will be confusing as the primary shared element.

Got it, that makes sense! I'll start with the mock-up first and then explore if there are any better options.

@shiffman shiffman reopened this Apr 30, 2024
@shiffman
Copy link
Member Author

Re-opening, looks like the social sharing image doesn't work on twitter?

https://twitter.com/pierre_nel/status/1785347109987762275

Screen Shot 2024-04-30 at 7 45 04 PM

It is working in Discord though maybe I should write a short few sentences for each chapter for text to include?

Screen Shot 2024-04-30 at 7 46 45 PM

@fturmel
Copy link
Contributor

fturmel commented May 28, 2024

Hi team, saw the Coding Train issue linking back here.

At first glance, it could be because the twitter:image meta tag is a relative link instead of absolute? Sometimes these service features can be proxied/cached and it's possible that they wouldn't find the origin anymore.

CleanShot 2024-05-28 at 11 22 02@2x

Google around for tools that can help audit og/twitter metadata, that might be helpful.
https://socialsharepreview.com/?url=https://natureofcode.com/
https://www.opengraph.xyz/url/https%3A%2F%2Fnatureofcode.com%2F

@fturmel
Copy link
Contributor

fturmel commented May 28, 2024

Also it looks like the "name" attribute should be used for Twitter and not "property". Open Graph uses "property" so it seems OK.

https://developer.x.com/en/docs/twitter-for-websites/cards/overview/summary
https://ogp.me/

It might've looked like some of the tags worked because there are fallbacks to og tags in some cases. https://developer.x.com/en/docs/twitter-for-websites/cards/overview/markup

@fturmel
Copy link
Contributor

fturmel commented Jun 5, 2024

@shiffman with #975 merged this issue can be closed. The previously mentioned tweet displays the thumbnail image correctly now.

@shiffman
Copy link
Member Author

shiffman commented Jun 6, 2024

Thank you!

@shiffman shiffman closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants