Discourse + Ghost integration and SEO


I connected my Ghostjs blog with my discourse forum and unlocked the commenting feature on posts like this:

So I can see that a post is created on the forum for each article. I am wondering about SEO.

Only a few sentences are kept on the forum but a button allows you to display the full message.

Can you confirm that the post created on the forum doesn’t include the entire text of the blog article?


1 Like

Yes, that is the case, you can see it in action on my blog at blog.codinghorror.com – verify for yourself.


Great! Thank you !

I will simply have to modify the titles of the forum posts, which I think is adjustable in the “external integrations” section of the forum.

1 Like

Hello, I have two more questions !

On this page https://ghost.org/integrations/discourse/ we can see that it’s possible to use multiple hosts to post comment threads to different categories on discourse. But how to do it if the hosts are the same ? (https://site.com) How to pass the category ?

I would also like to use a completly different title for the forum (do not use the title of the blog page). Is it possible to pass a variable with a name for the forum title ?

Is there a way to complexify this code ?

<div id='discourse-comments'></div>

<script type="text/javascript">
      if (window.location.pathname.indexOf('/p/') < 0) {
  DiscourseEmbed = { discourseUrl: 'https://forum.ghost.org/',
                     discourseEmbedUrl: '{{url absolute="true"}}';

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

Another solution would be to simply link a forum topic to an article whenever I want. Is it possible to choose a forum topic to display on the blog?
Thanks !

Yes, check Embedding Discourse Comments via Javascript.

No that is not possible. We use the HTML attribute. You can edit it afterwards, and can automate either the topic creation or the title edit using our API.


Thanks ! I guess your first solution is the best for me !

Hello, last question on this subject !
For the moment I have trouble displaying the pictures when I click on “see the full message” on the forum …
Probably because these are SVG images. But it still doesn’t work with PNG images.
I guess I just need to change the settings in “External integration settings”.
I don’t really understand the difference between “CSS selector for elements that will be allowed in embedded content” and “CSS classes allowed” … (translation problem maybe?).

I would like to understand what is catched for the post on the forum and what is displayed when we click on “see the full message”.

I do not find anything on this subject in the Discourse documentation.
Any idea on this?
Thank you !

@codinghorror , just want to highlight that I cannot see any examples of embedding discourse in your blog articles, there’s an embedding error header instead. I use firefox add-ons like Ghostery, Privacy Badger and uBlock, is that what’s leading to the embedding error? I can see javascript embeds in other sites I’m browsing and I haven’t whitelisted these, hence the reason.

@Falco, just saw Ghost + Discourse integration website, could you or @codinghorror horror clarify one thing for me?

I am not sure if this integration means that, anytime I post an article on my Ghost blog, a new topic / thread of discussion will automatically be created in Discourse. If my understanding is correct, could you let me know? If wrong, could you let me know what the best way to come up with something similar would be?

Many thanks in advance!

Since I can see the Discourse comments just fine in a standard Firefox session, I’d recommend your to try disabling those extensions temporarily and testing. I’m sure they are breaking the feature.

Yes that is exactly it. Every new blog post will create a companion post on the Discourse instance.

1 Like

Please read this and see screenshot below:

I have deactivated uBlock, HTTPs everywhere (shouldn’t really affect functionality), Ghostery, Cookie Autodelete and Decentraleyes, also installed this FF addon as suggested.

I can see as much as the screenshot displays.

Great! If I get my head around issue #1 then Discourse it is for commenting on my blog!

Many thanks for your assistance!

Jeff, you host Ghost and Discourse on subdomains of codinghorror.com. Are these both Docker installs and are both software on the same server?

Your subdomains have different IP addresses as do those of Porco Rosso’s integration subdomains. Is this a requirement even if they share the same server? That is to say, can Discourse and Ghost share the same IP address?

I am asking because I am going to attempt the integration myself and my Discourse instance runs in a Docker container. I have not yet installed Ghost.