vertx-web-site / vertx-web-site.github.io

The official Vert.x website (https://vertx.io)
https://vertx.io
Apache License 2.0
18 stars 72 forks source link

Improving metadata for blog posts #158

Closed tsegismont closed 6 months ago

tsegismont commented 7 months ago

I've shared a blog post today and, when sharing it on social media, found that the chosen illustration was my GitHub profile picture.

LinkedIn has a tool which allows to analyze a link shared in a post:

https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fvertx.io%2Fblog%2Fmicrometer-metrics-performance%2F

It confirms the author's GH profile pic is the identified image and that the website general description is associated with the article.

@michel-kraemer do you know if our blogging tool allows to improve this?

michel-kraemer commented 7 months ago

Yes, this is possible. I have code that I could reuse.

What information do you want to display? Something like the following would be easy to implement:

image

michel-kraemer commented 7 months ago

(This is an example from my website, by the way)

tsegismont commented 7 months ago

How did you get this image? It looks great (title + date + description of the article).

Is it generated automatically by LinkedIn, Twitter ... etc when pasting a link in the compose panel?

Is is possible to choose an alternative image? For example, I wanted to have one of the flamegraphs in the article instead of my GH profile pic

michel-kraemer commented 7 months ago

My website uses automatically generated Open Graph metadata from which the LinkedIn tool gets its information. The image is in the og:image tag, which is generated during the build process.

Yes, it would be possible to embed custom graphics in the generated image. How soon do you need a solution? If you just want to set a custom image, I can quickly hack something tonight. Just send me the image. For a clean solution, I could try to find some time over the weekend or during next week.

tsegismont commented 7 months ago

There's no hurry, really. Thank you for taking time to help us again :hugs:

michel-kraemer commented 7 months ago

Ah. OK. Then I'll implement it some time next week.

michel-kraemer commented 6 months ago

@tsegismont OpenGraph images for blog posts are now generated during build. Your post, for example, looks like this:

micrometer-metrics-performance

tsegismont commented 6 months ago

Excellent @michel-kraemer ! And it seems it's already been picked-up by LinkedIn :100: