Embedded Discourse

Hello all,

I created a custom embed via admin->customize->embedding.

Then the calling website has the following code injected:

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

          <script type="text/javascript">
            DiscourseEmbed = { discourseUrl: 'https://forum.geekbeacon.org/',
                               discourseEmbedUrl: 'https://beta.geekbeacon.org/announcements/back-from-the-dead/' };

            (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>

It seems like the posts are being created on the forum, but the webpage has a peculiar behavior/error being returned.

What’s the issue? is that the discourseEmbedUrl includes the FQD including the https?

Any help would be appreciated.

Try removing the “/announcements/*” path.

1 Like