fastn icon indicating copy to clipboard operation
fastn copied to clipboard

Some SEO properties not working in different platforms

Open gargajit opened this issue 2 years ago • 1 comments

For SEO, we use properties like:document-title, document-description and document-image and pass them to ds.page.

I added them in my test site. When I share the link to different platforms, it is not displaying all three values. Either of the image or description fails to display.

Test link: https://gargajit.github.io/sunset-BC-test/

Meta Tags: Screenshot 2023-08-07 at 3 33 49 PM

Three platforms I tested - LinkedIn, Discord, Twitter:

LinkedIn: Only Title and Image displayed image

Discord: Image is not displayed image

Twitter: No SEO data coming up Screenshot 2023-08-07 at 3 21 59 PM

gargajit avatar Aug 07 '23 10:08 gargajit

If you use some link checker, eg https://www.opengraph.xyz/url/https%3A%2F%2Fgargajit.github.io%2Fsunset-BC-test%2F, the image is not showing up. The image URL displayed there is: https://gargajit.github.io-/gargajit.github.io/sunset-bc-test/assets/card-front.jpg. In the HTML head also we have:

<meta property="og:image" content="-/gargajit.github.io/sunset-bc-test/assets/card-front.jpg">

This URL is wrong. We add base in the head:

<base href="/sunset-BC-test/">

But looks like social media crawlers do not honour base URL.

@Arpita-Jaiswal I think we should do special handling for this property and "manually" (in Rust I mean) construct the proper URL.

amitu avatar Aug 07 '23 10:08 amitu