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:
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: Rich link previews with Onebox - faq - 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: https://github.com/discourse/onebox. 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.