This issues was brought up 2.5 years ago, and it seems like it is still happening. I was hopeful that the hard work to improve google search results would help this along but it seems it hasnāt.
As everyone who has been on the forum knows, when you post a link to a page on SuttaCentral.net in its own line in a forum post, it creates a generic looking link preview instead of a preview of the specific sutta being linked to. Like so:
https://suttacentral.net/mn21/en/sujato
I have tried posting the same link to another discourse based forum and I get identical results. I also found a testing website that looks for the tags that are used to create these previews (opengraph.xyz) For example, the link I shared above tests like this:
Does anyone know if this is something that can be fixed? Since it seems to be a problem on the coding side of SuttaCentral.net, I donāt think it is anything I can help with other than testing. Does anyone at the @helpdesk-dd know the status of this?
I realize that dev time is limited, but I think this fix could really improve the usability of the forum, not to mention that it improves the clickability of shared suttas on other platforms.
BTW, Pasting a link inside a paragraph like this, SuttaCentral, also doesnāt work as it should. Imagine how cool it would be if we could paste that link and it automatically said MN 21 KakacÅ«pamasutta.
EDIT: I found this help page on Discourse, link is to the troubleshooting section: Create rich link previews with Onebox - users - Discourse Meta
If Onebox is not working as expected, please check the following:
- Test your site by pasting the link into iFramely ; check that the target is using correct OpenGraph or oEmbed meta tags for content. And remember the description text is required in Discourse!
- Verify that the onebox request to the target website has not been blocked by
user-agent
. Some WordPress hosts frequently block āunknownā user agents.
Testing using that site gives basically the same result.
EDIT2: Just found the link to the github for Onebox: GitHub - discourse/onebox: (DEPRECATED) A gem for turning URLs into website previews. If the problem canāt be solved on suttacentral.netās side, perhaps something could be done to help Onebox pick up the data on the sc pages.