readthedocs / website

The Read the Docs community website
15 stars 5 forks source link

Fix blog opengraph #271

Closed ericholscher closed 2 months ago

ericholscher commented 4 months ago

Our blog index currently doesn't really show anything reasonable for opengraph:

https://www.opengraph.xyz/url/https%3A%2F%2Fabout.readthedocs.com%2Fblog%2F

humitos commented 4 months ago

It seems the individual blog shows opengraph correctly: https://www.opengraph.xyz/url/https%3A%2F%2Fabout.readthedocs.com%2Fblog%2F2024%2F02%2Fintroducing-latest-aliases%2F

@ericholscher can you expand on how exactly the opengraph should look? I think you may have more context on this.

ericholscher commented 4 months ago

It should just mention that it's the blog, right now it's just a weird blank title.

davidfischer commented 4 months ago

The meta description and OG description are both blank on https://about.readthedocs.com/blog/2024/02/introducing-latest-aliases/ though. Actually it seems like it's blank on every page including the homepage. That's pretty important from an SEO perspective.

davidfischer commented 2 months ago

I built the website today while reviewing a blog PR. It looks like descriptions will get picked up and put into both <meta name="description"> and <meta property="og:description">. I tested this on both blogs where the description is written in markdown front matter and in pages where descriptions are written directly in the HTML. As a result, I believe this issue just distills down into "write descriptions for key pages and blogs".