Skip to content

Commit

Permalink
chore: added Comments section
Browse files Browse the repository at this point in the history
  • Loading branch information
KirankumarAmbati committed Mar 9, 2019
1 parent 41212e8 commit 1430559
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -8,6 +8,7 @@
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"dependencies": {
"disqus-react": "^1.0.5",
"gatsby": "^2.1.19",
"gatsby-image": "^2.0.30",
"gatsby-plugin-feed": "^2.0.14",
Expand Down
4 changes: 1 addition & 3 deletions src/components/layout.js
Expand Up @@ -63,9 +63,7 @@ class Layout extends React.Component {
<header>{header}</header>
<main>{children}</main>
<footer>
© {new Date().getFullYear()}, Built with
{` `}
<a href="https://www.gatsbyjs.org">Gatsby</a>
Crafted by the people, for the people.
</footer>
</div>
)
Expand Down
1 change: 1 addition & 0 deletions src/pages/index.js
Expand Up @@ -17,6 +17,7 @@ class BlogIndex extends React.Component {
title="All posts"
keywords={[`blog`, `gatsby`, `javascript`, `react`]}
/>
<p><b>Note:</b> This docs are contributed by passionate developers around the world. You can find the link to contributor profile in each article. If you like what we are doing, give <a href="https://github.com/KirankumarAmbati/I-can-not-REACT">this repo</a> a star, contribute to the docs and follow the contributors. Cheers!</p>
{posts.map(({ node }) => {
const title = node.frontmatter.title || node.fields.slug
return (
Expand Down
4 changes: 3 additions & 1 deletion src/templates/blog-post.js
@@ -1,5 +1,6 @@
import React from "react"
import { Link, graphql } from "gatsby"
import { DiscussionEmbed } from 'disqus-react'

import Bio from "../components/bio"
import Layout from "../components/layout"
Expand Down Expand Up @@ -29,13 +30,13 @@ class BlogPostTemplate extends React.Component {
>
{post.frontmatter.date}
</p>
<Bio userName={post.frontmatter.author} />
<div dangerouslySetInnerHTML={{ __html: post.html }} />
<hr
style={{
marginBottom: rhythm(1),
}}
/>
<Bio userName={post.frontmatter.author} />

<ul
style={{
Expand All @@ -61,6 +62,7 @@ class BlogPostTemplate extends React.Component {
)}
</li>
</ul>
<DiscussionEmbed shortname="kirankumarambati" config={{identifier: post.id, title: post.frontmatter.title}} />
</Layout>
)
}
Expand Down

0 comments on commit 1430559

Please sign in to comment.