docs icon indicating copy to clipboard operation
docs copied to clipboard

Integrating discourse comments on the docs

Open criadoperez opened this issue 3 years ago • 2 comments

I've added the following domains in the discourse forum configuration:

  • stacks-docs-new.vercel.app
  • docs.stacks.co

as valid domains for the discourse-stacks-docs integration.

To be able to use this integration the following html code needs to be called:

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

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: 'https://forum.stacks.org/',
                     discourseEmbedUrl: 'REPLACE_ME' };

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

Multiple ways of doing this, but creating a React component for this would be one way.

criadoperez avatar Jun 06 '22 12:06 criadoperez

A potential solution for this can be found here

react-inline-script seems to leave Docusaurs in a loop while loading the page :-(

criadoperez avatar Jun 13 '22 14:06 criadoperez

@jhammond2012 any update on this?

criadoperez avatar Jul 15 '22 18:07 criadoperez

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 21 '23 08:01 stale[bot]

This issue has been automatically closed. Please reopen if needed.

stale[bot] avatar Mar 25 '23 07:03 stale[bot]