material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[docs] Add open-graph prefix

Open alexfauquette opened this issue 2 years ago • 3 comments

Trying to fix why doc preview has bad preview image on LinkedIn.

Seems to be a common StackOverflow question that can be solved by defining of prefix in the header

To do: test the preview with LinkedIn inspector to see if fix is working

alexfauquette avatar Sep 19 '22 12:09 alexfauquette

Messages
:book: Netlify deploy preview: https://deploy-preview-34382--material-ui.netlify.app/

No bundle size changes

Generated by :no_entry_sign: dangerJS against 59beaa3eb370f823291909a8edadd16e8e6dfc08

mui-bot avatar Sep 19 '22 12:09 mui-bot

Seems to work. I also included extra information: the authors and the publication date, such that algorithm could detect that it's fresh content

https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fdeploy-preview-34382--material-ui.netlify.app%2Fblog%2Fintroducing-mui-base%2F

alexfauquette avatar Sep 19 '22 12:09 alexfauquette

Interesting, it seems to be a continuation of #33954.

Regarding testing the changes, when I compare deploy-preview-34382--material-ui.netlify.app/blog/introducing-mui-base with mui.com/blog/introducing-mui-base, I can only see one difference:

Screenshot 2022-09-19 at 16 30 48

So I conclude that only <meta name="author" content=" makes a difference, the rest has no impacts grin

Effectively, I don't know why I got the wrong image the first time 🤔

the prefix might not be a bad thing. If the date with the full date/time is recognized by LinkedIn it will be an improvement

alexfauquette avatar Sep 19 '22 15:09 alexfauquette

There seems to be a problem with the publication date still. Do you intend to fix it in this PR or is it solely about the preview image?

michaldudak avatar Oct 28 '22 09:10 michaldudak

@michaldudak Thanks for the reminder :)

I tend to think that the LinkedIn parser is ~~broken~~ strange

I had a look at two articles:

I inspeceted the meta tag, those with or are the same, so no reason one has it's date detected, and the other not

I added the prefix for article tags: article: http://ogp.me/ns/article#" but does not seems to change the behavior

alexfauquette avatar Oct 28 '22 09:10 alexfauquette

Yeah, that's strange indeed. Let's merge what we have. It's an improvement anyway.

michaldudak avatar Oct 28 '22 10:10 michaldudak

I have rebased and pushed a few more improvements.

oliviertassinari avatar Oct 31 '22 01:10 oliviertassinari

@alexfauquette can we merge this so that we can include in the today's release?

mnajdova avatar Oct 31 '22 09:10 mnajdova