Hello,
I have set up a Discourse instance on my server and it works fine.
But when I try to embed it on my Ghost blog the Discourse frame just shows
“Loading Discussion…”
Here is the code I insert :
<div id='discourse-comments'></div>
<script type="text/javascript">
DiscourseEmbed = { discourseUrl: 'http://discourse.domain.net/',
discourseEmbedUrl: 'http://subdomain.domain{{url}}'};
(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);
})();
</script>
I use the admin username I set up first and the allowed host is blog.domain.net
The discourse.domain.net/logs gives me no errors
Any advice on what to do next ?
Thanks
1 Like
So i’ve tried a few things and I think I have located the problem.
The comment topics are created properly in Discourse and they have the following url :
http://discourse.domain.net/t/name_of_blog_post/14/1
But I checked what url the embed part was looking for and Firefox gave me this
http://discourse.domain.net/embed/comments?embed_url=%2Fname_of_blog_post%2F
Why does that difference exist ?
Anything to add here @eviltrout? Something we can make clearer in the instructions?
riking
(Kane York)
4
I think this should be the canonical URL of the blog post, not test
.
Sorry I hadn’t updated my original posts,
I tried :
discourseEmbedUrl: 'http://subdmomain.domain{{url}}' and the result is the same
It gives me the following request :
http://discourse.domain.net/embed/comments?embed_url=http%3A%2F%2Fsubdmomain.domain%2Fname_of_blog_post%2F
Ok problem solved
it was
'http://subdmomain.domain{{url}}'
I forgot the .net, dumb of me.
Thank you so mu for your help
2 Likes