Hi all,
I followed @eviltrout 's awesome tutorial here http://eviltrout.com/2014/01/22/embedding-discourse.html but can’t get it to work properly.
This is how it looks embedded :
<div id="discourse-comments"></div>
<script type="text/javascript">
var discourseUrl = "http://discourse.ars-artificia.com/",
discourseEmbedUrl = 'http://ars-artificia.com/Spring cleaning';
(function() {
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
d.src = discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);})();
</script>
see https://ars-artificia.com/spring-cleaning/ for reference.
My discourse is set up accordingly. I am using ghost to host my blog - I don’t get any changes.
Thanks in advance !
For reference here is how @codinghorror embedded discourse in his blog
</article>
<div id="discourse-comments"></div>
<script type="text/javascript">
var discourseUrl = "http://discourse.codinghorror.com/",
discourseEmbedUrl = 'http://blog.codinghorror.com/the-god-login/';
(function() {
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
d.src = discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
})();
</script>
</main>
and this is my current version:
</footer>
</article>
<div id="discourse-comments"></div>
<script type="text/javascript">
var discourseUrl = "http://discourse.ars-artificia.com/",
discourseEmbedUrl = 'https://ars-artificia.com/spring-cleaning/';
(function() {
var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
d.src = discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
})();
</script>
Edit: Found the solution !!
As my discourse instance isn’t ssl secured yet, I embedded non-secure content on a secure website. This was blocked in my browser (firefox) because of security issues ! In e.g. interntet explorer everything works fine thanks a lot for the help, @bartv and @Mittineague !
ISSUE SOLVED
Edit: Grabbed some new ssl certs and verified everything is working properly now. Remember that you can’t simply embed non secure content into a https site !