Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Add support for DISQUS comments #85

Open
tm9k1 opened this issue Jan 25, 2019 · 2 comments
Open

Add support for DISQUS comments #85

tm9k1 opened this issue Jan 25, 2019 · 2 comments

Comments

@tm9k1
Copy link

tm9k1 commented Jan 25, 2019

having an option to build with DISQUS as comments plugin would be nice!

@LeBaux
Copy link

LeBaux commented Jan 30, 2019

@hendra-go is using this in his branch already, ultimately we are all waiting for @greglobinski regarding issue #64

@hendra-go
Copy link
Contributor

hendra-go commented Feb 21, 2019

Well, i actually removed disqus and try to implement my own custom commenting system using gatsby + firebase realtime database.

But if you still want to use disqus, it is not that complicated i guess.

first: You need to install react-disqus-comments. yarn add react-disqus-comments or npm install react-disqus-comments

second: In src/components/Post/PostFooter.js remove facebook props from PostComments
<PostComments post={post} slug={slug} facebook={facebook} /> becomes <PostComments post={post} slug={slug} />

third: In src/components/Post/PostComments.js replace react-facebook with react-disqus-comments`
like this:

import ReactDisqusComments from "react-disqus-comments";
.
.
.
const PostComments = props => {
  const { classes, slug, post} = props;

  return (
    <div id="post-comments" className={classes.postComments}>
          <ReactDisqusComments
            shortname="YOUR_DISQUS_SHORTNAME"
            identifier={post.title}
            title={post.title}
            url={`${config.siteUrl}${slug}`}
            category_id={post.category_id}
          />
    </div>
  );
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants