readthedocs / blog

Read the Docs blog
https://blog.readthedocs.com
17 stars 56 forks source link

Add sphinxext-opengraph #118

Closed astrojuanlu closed 3 years ago

astrojuanlu commented 3 years ago

This should improve the appearance of our links when shared in social media. Close #108.

astrojuanlu commented 3 years ago

The generated image link is wrong: background-image: url("https://readthedocs-blog--118.org.readthedocs.build../_images/rebuild.png"); will open an issue upstream about this.

astrojuanlu commented 3 years ago

https://github.com/wpilibsuite/sphinxext-opengraph/issues/43

astrojuanlu commented 3 years ago

Some caveats:

humitos commented 3 years ago

but it doesn't quite fit the aspect ratio of media shares

I don't like how it looks 😄

What about using just the logo, https://docs.ops.verbthenouns.com/projects/guidelines/_downloads/ed58d5ce6820efcfb0aa0146ee561409/logo-dark.png

Another option is to update the same image that you are using but with a bigger height (blank) so it scales properly.

astrojuanlu commented 3 years ago

I don't like how it looks 😄

Yeah, me neither 😂 testing your proposal

astrojuanlu commented 3 years ago

Better now (at least the text is not cut)

Screenshot from 2021-07-22 10-42-48

For anything more sophisticated than this, I'd need to refresh my GNU I.M.P. abilities :)

nienn commented 3 years ago

It's greatly improved. Although I still don't like the look of the oversized logo 😄

Based on this article the best image size should be 1200 x 630.

I'd need to refresh my GNU I.M.P. abilities :)

I can alter the image if there's an option to upload it somewhere.

astrojuanlu commented 3 years ago

Super insightful article, thanks @nienn !

I can alter the image if there's an option to upload it somewhere.

In the absence of a better option, I guess we can upload it to the blog itself?

humitos commented 3 years ago

In the absence of a better option, I guess we can upload it to the blog itself?

Sounds good to me!

astrojuanlu commented 3 years ago

@nienn sent me a modified version of the logo, modified from the original SVG for a more appropriate aspect ratio (thanks!). However, as I added it as part of this PR, I won't be able to test it until it's merged.

nienn commented 3 years ago
test

This is NOT a real test on opengraph.xyz. It's just a montage with a preview of what it should look like.

The logo was altered from the official version by spreading the text over 3 lines and changing it's proportion relatively to the icon.

astrojuanlu commented 3 years ago

It looks great! When someone submits an accepting ✔️ 🟢 review I will merge the pull request, and we can make further adjustments thereafter

ericholscher commented 3 years ago

@nienn Looks great -- I'll let @agjohnson chime in as current owner of the brand/logo, but I'm guessing that might shift to you here before long ✨

Our official logos are here: https://read-the-docs-guidelines.readthedocs-hosted.com/ -- but we don't have one in that aspect ratio.

agjohnson commented 3 years ago

Looks good! The wordmark doesn't lend great to being split up, with the italicized the dangling in the middle, but I don't think that's a huge issue given the use case here.

Two options that would preserve the wordmark/logo for this format would be logo or wordmark only, but in the correct ratio, or logo in the background (probably fade out a good deal) and the main, single line wordmark centered overlaying that.

All seem like good options.

agjohnson commented 3 years ago

Also, this image format would be great to include in guidelines repo.

nienn commented 3 years ago

Moving the logo discussion over here: readthedocs/guidelines#1

So it won't keep blocking this PR!

astrojuanlu commented 3 years ago

I get from the discussion that this is a good start, and that there will be possibly more iterations on https://github.com/readthedocs/guidelines/issues/1, so I'll go ahead and merge this, so we can start testing how it looks like in real life. Thanks everyone!

astrojuanlu commented 3 years ago

Just tested it, it works 💯