Embed Discourse comments on another website via Javascript

Also, does anyone know how this part works? The example given to scrub the title of the posts is - site.com$, so I’m entering things like | The Site Name$ (the suffix on every blog <title>), but Discourse isn’t stripping that part off. Is that the correct format?

How can i embed comments in html to my website?


Welcome! Did you look at the first post on this topic? It describes exactly how to do that. If you tried and it didn’t work, then you’ll need to say more about what you did and share your url if it’s public.

1 Like

Hello. I want to display comments as HTML instead of iframes to improve SEO. Of course, the page containing forum comments should display my main site as canonical. I believe Discourse’s WordPress comment plugin displays comments as if they belong to the site instead of using iframes. My CMS doesn’t have this feature, so I’m looking for a way to display comments as HTML.

1 Like

(This question touches on a few related topics, this and mobile app integration, but I think this is the most relevant. Feel free to move!)

If I wanted to import only this kind of comment functionality into a mobile app, is that possible these days?

ps - hi :waving_hand:

2 Likes

It should be, but the basic feature is read-only, so if what you app needs is a read-only comments list in a webview it will work.

If you can share more about your use case maybe I can help.

Ah gotcha! Yeah, read-only isn’t quite what I need. I would want people to be able to comment from the page/view itself (for example, an embedded article with our own “comment” system, but under the hood it’s just Discourse)

You may want to check Embed Discourse as a full comment system on your site, which addresses the ability to write.

But that still isn’t meant to be the only way people interact with Discourse. It is meant for people who consume both the “blog” and the community mostly. Still, may help your use case.

If that doesn’t pan out, then you can always go down the custom API integration and intermediate the integration via your app.

Nice to see you around these parts :hugs:

To add, if mobile apps have the ability to pre-auth a user, the embedding full comment system could work for you, assuming there is a single SSO for the site. It is definitely possible to do as long as Discourse somehow already knows who the user is when they visit+show comments.