Open gohai opened 6 years ago
@gohai great catch!
I've been reading up on how the social tags are output in Hugo. Turns out there are some internal templates that do most of the work automatically: https://gohugo.io/templates/internal/#the-internal-templates Here are the templates if anybody's curious: https://github.com/gohugoio/hugo/blob/91ab455d846a67a90b19e810b2accec0404b3108/tpl/tplimpl/embedded/templates.autogen.go
And this website for another Hugo theme details the use of default image (kinda what discourse pic showed):
Basically we need to start using "images" array in the default config file and also in the posts.
If you tell me what image to use throughout the site if none is in the article/post, I can quickly add that to config.toml
and meanwhile will try out some things for the tutorials' images.
@msurguy We have a bunch of logos in https://github.com/processing/processing-pi-website/tree/master/themes/processing/static - perhaps just the most high-res one as the fallback?
@gohai great, I'll try out the 512x512 logo that is in the folder you provided. I double checked with this article about the sizes to find the optimal sizing: https://sproutsocial.com/insights/social-media-image-sizes-guide/
For Facebook it is: Shared Image: 1,200 x 630 Shared Link: 1,200 x 628 Square Photo: Minimum 154 x 154px in feed.
For Twitter: In-Stream Photo: Minimum 440 x 220 (2:1 Ratio)
So after I try out the default 512x512 image, we might need to come up with a way that will work between various networks and still produce an OK result.
@msurguy I believe the Processing Discourse image is square and still looks reasonably good on twitter. That's all that I would shoot for, it looking okay on twitter.
I was curious why this showed the default grey placeholder icon for the link preview, whereas the link to the Discourse showed the logo:
Turns out that there are specific meta-tags that govern this behavior. Perhaps worth modifying the hugo theme to include them? (I believe even a global, static logo - like the one displayed with the Discourse link - would be a nice touch.) What you think @msurguy?
If twitter is also picking up the more general OpenGraph tags, than it'd be probably better to make use of those.