Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to embed the code from Disqus into my blog site #133

Oppenheimer1 opened this issue Feb 21, 2016 · 4 comments

Trying to embed the code from Disqus into my blog site #133

Oppenheimer1 opened this issue Feb 21, 2016 · 4 comments


Copy link

@Oppenheimer1 Oppenheimer1 commented Feb 21, 2016

I was trying to embed the comment code from Disqus into my blog site, the code below and tried embedding it in multiple ways locally in wrappers/md.js but I haven't been able to get it to work. Any help would be much appreciated.

var React = require('react');
var ReactDisqusThread = require('react-disqus-thread');

var App = createClass({

handleNewComment: function(comment) {

render: function () {
    return (
            title="Example Thread"


React.render(, document.getElementById('container'));

Copy link

@KyleAMathews KyleAMathews commented Feb 21, 2016

See how I do it on my blog here:

You shouldn't be calling React.render in a wrapper. Gatsby handles that for you. Just export a component.

Copy link

@KyleAMathews KyleAMathews commented Feb 26, 2016

Let me know if you need any more help.

Copy link

@dougajmcdonald dougajmcdonald commented Oct 19, 2017

I did this and it blew up setting url for some reason, removing that worked ok

Copy link

@hexrcs hexrcs commented Jul 10, 2018

@dougajmcdonald Mine blew up as well with custom url or identifier - it turned out that I was using the location prop as a string! Changing this.props.location to this.props.location.pathname fixed the problem.

ChristopherBiscardi added a commit to ChristopherBiscardi/gatsby that referenced this issue Jun 27, 2019
* Made componentWithMDXScope a no-op. It is deprecated and doesn't
  need to be used any more. MDXRenderer is still required for previous
  uses that required it.
* Scopes are now imported via custom webpack loader
  - TODO: rename mdx-scopes to the loaders dir
* Scopes are now merged into a single scope and injected into
  wrapRootElement on both SSR and Browser renders
* Querying code.scope is now a no-op
  - No files are written when this happens
* Relative path import support is added to all MDX Nodes

closes gatsbyjs#214 gatsbyjs#202 gatsbyjs#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants