Chronoblog / gatsby-theme-chronoblog

⏳ Chronoblog is a Gatsbyjs theme specifically designed to create a personal website. The main idea of ​​Chronoblog is to allow you not only to write a personal blog but also to keep a record of everything important that you have done.
https://chronoblog.now.sh
MIT License
130 stars 26 forks source link

Commenting solution #43

Closed fmeehan closed 4 years ago

fmeehan commented 4 years ago

Hello!

I know this goes somewhat against the philosophy of Chronoblog, still I need a commenting solution for posts.

After looking at various solutions, I tried Disqus with no success.

Did try:

Seems that there are no easy solutions to implement Disqus on Markdown pages/posts.

I could use another commenting system if that could work with Chronoblog.

Any ideas?

François Meehan

ganevdev commented 4 years ago

Hi.

I recently made an example of how it is possible to use Disqus in Chronoblog: https://github.com/Chronoblog/gatsby-starter-chronoblog-disqus

An example post with comments: https://chronoblog-disqus.now.sh/small-blog-post

Description of how this works in the documentation: https://github.com/Chronoblog/gatsby-theme-chronoblog#get-post-data-in-post-footer

I do not use commenting systems, because of this, maybe I missed something, or something may not work as it should. Try these solutions and write whether it turned out.

All this will work only in the version of Chronoblog v0.18.0 or higher.

fmeehan commented 4 years ago

Thanks Ivan!

Did the update to v0.18.0 and applied changes to post-footer.mdx and gatsby-config.js.

Gatsby starts without error until trying to open a post at which point I get:

> TypeError: Cannot read property 'fields' of undefined MDXContent
> src/gatsby-theme-chronoblog/post-footer.mdx:28
>   25 | <AuthorBanner mdxType="AuthorBanner"></AuthorBanner>
>   26 | <p>&nbsp;</p>
>   27 | <Disqus config={{
> > 28 |   url: props.siteMetadata.siteUrl + props.postData.fields.slug,
>   29 |   title: props.postData.frontmatter.title,
>   30 |   id: props.postData.id
>   31 | }} mdxType="Disqus" />

Any ideas?

Thanks in advance,

François

ganevdev commented 4 years ago

Where do you get the Disqus component? Is this a plugin https://github.com/tterb/gatsby-plugin-disqus?

And I don’t really understand what mdxType = "Disqus" does.

fmeehan commented 4 years ago

Hi,

That is the one that I installed.

I have installed gatsby-starter-chronoblog-disqus on a separate instance and it works perfectly.

For now I will move over my content and config to the new starter, that will give me the chance to do a good spring cleaning.

And for the record, I was using Justcomments. Unfortunately this solutions is not viable anymore as the developer sent this message:

JustComments does not accept new customers. JustComments will shut down by the end of 2020. Read more in our blog.

Thanks for the prompt response, I hope everything health wise is ok for you and family in Moscow.

All the best!

François