How to add disqus comment section to jekyll pages?

  1. Create an account in disqus
  2. While signing up choose “I want to install disqus on my site”
  3. Enter your website name, disqus uses this name to generate a “disqus short name”. This name is later used in configs.
  4. Select basic plan on Choose your plan page. This is a free subscription. Make sure you read and understand their terms.
  5. In the next section, select jekyll platform, this will take you to installation instructions.
  6. You should be presented with a code snippet like below
     ---
     layout: default
     comments: true
     # other options
     ---
    

    Add this under _layouts/post.html. For me this is where I load individual posts.

  7. Installation instruction page should also give you Universal Embed Code. It should look something like this.
        
    

Copy above snippet to _layouts/post.html. **Remember to change to your disqus shortname**

  1. Click next and complete setup.

Generate your website in jekyll. You should now see disqus comments section in your post page.

Tip: If you need to disable comments for a single post, add comments: false in the post.