5 Ways to Add Comments to Ghost

Ghost LogoGhost is a great blogging platform, but does not yet have a built-in commenting system.

Also, Ghost does not yet have an API for plugins, so it doesn't have an obvious way to add comments.

In this tutorial, we'll show you five ways to add comments to your Ghost blog.

We're going to cover these five commenting platforms:

  1. Disqus
  2. Livefyre
  3. Google+
  4. Facebook
  5. Ouija

Option #1. Disqus

Disqus.com (used on this OSTraining.com blog) is one of the most widely used commenting platform. Follow these steps to integrate Disqus with your Ghost blog:

  • Go to Disqus.com and signup for a new account.
ghost-comments-disqus-01.png
  • After registration head over to http://disqus.com/admin/create/ and fill out the form:
    • Site Title: Enter the name of your website
    • Disqus URL: This is automatically set based on the site name but you can also customize it.
    • Category: Choose a category that best describes your website.
  • The next page will display a list of popular CMS which have plugins for easy integration. Since Ghost does not yet support plugins, click on the Universal Code option.
  • Copy and save the code provided.
  • To add the comments to your blog, open the post.hbs file inside your theme folder and paste the code you had copied in the previous step just before the closing {{/post}} template tag:
  • Now restart your Ghost blog to see the Disqus comments displayed below each post.
ghost-comments-disqus-02.png

Option #2. Livefyre

Livefyre is a dedicated commenting system similar to Disqus. The integration is also similar to Disqus. To integrate it with your blog, follow these steps:

ghost-comments-livefyre-01.png
  • Head over to http://www.livefyre.com/install/.
  • Enter your blog URL and then choose Custom as the platform.
  • Click on the Step 02 button to proceed to next step.
  • You will now see the integration code. Copy the code so we can use it in our next step.
  • Open the ‘post.hbs’ file inside your theme folder and paste the code just before the closing {{/post}} template tag.
  • Now save and restart your Ghost blog to see the Livefyre comment box displayed below your posts:
ghost-comments-livefyre-02.png

Option #3. Google+

Google does not offer or officially recommend using their commenting system anywhere else other than Blogger. However thanks to William Chambers, you can now easily integrate Google+ commenting by simply dropping few lines of code into your theme.

To add the Google+ comments to your blog, open the ‘post.hbs’ file inside your theme folder and paste the below code just before the closing {{/post}} template tag:

ghost-comments-googleplus.png

Option #4. Facebook

Integrating Facebook comments to your Ghost Blog is similar to integrating Google+ comments but you will also need a Facebook APP ID. Follow these steps to add Facebook comments to your blog:

  • Go to https://developers.facebook.com/apps.
  • Click on the Create New App button.
  • Enter an App Name for the App ID and choose a category.
  • Open your post.hbs file inside your theme folder and paste the below code just before the closing {{/post}} template tag.

<div id="fb-root"></div>
 <script>
     (function(d, s, id) {
         var js, fjs = d.getElementsByTagName(s)[0];
         if (d.getElementById(id)) {
             return;
         }
         js = d.createElement(s); js.id = id;
         js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<your-facebook-app-id-here>";
         fjs.parentNode.insertBefore(js, fjs);
     }(document, 'script', 'facebook-jssdk'));</script>
     <div
         class="fb-comments"
         data-href="{{@blog.url}}/{{slug}}"
         data-colorscheme="light"
         data-numposts="10" 
         data-width="700" >
     </div>
 

  • Replace <your-facebook-app-id-here> in the above code with the Facebook App ID you created in the previous step.
  • Restart your Ghost blog.
ghost-comments-facebook-02.png

Option #5. Ouija

Ouija is a new solution which aims to provide commenting in the sidebar (rather than below the footer) that you see on sites such as NYTimes.com and Medium.com. Ouija will be a commenting platform for Ghost only. It’s still under development and as stated on their website it’s not ready for production use, but you can sure test it. Head over to http://ouija.io/ and follow the instructions on the website.

Summary

Of the five systems we've shown above, Disqus and Livefyre definitely are the most popular choices. As development of Ghost continues and the plugin API is released, it will become easier to add comments in the future.


About the author

Harish is a designer & WordPress developer from Mumbai. He runs a web design agency "Dreams Media" and writes about random stuff on his personal website HarishChouhan.com.