Adding Disqus comments to Ghost blog on Azure

If you have a Ghost hosted on Azure (like I did) then you may want to add Disqus comments to it (like I did).

To do so, follow the steps below:

  1. Create a Disqus account if you haven't done so already.
  2. Login to Disqus and navigate to the admin page.
  3. Click on Install Disqus and choose Ghost from the list.
  4. Open a new tab and navigate to Azure portal and from the dashboard open/navigate to the application hosting your Ghost blog.
  5. On the application blade select App Service Editor and press Go-> to open the editor for your blog.
  6. In the editor navigate to wwwroot\content\themes\<your-theme>\post.hbs. This will load the file in the panel on the right.
  7. Go back to Ghost Install Instructions on Disqus and copy the Universal Embed Code.
  8. Paste the code into post.hbs file in the place where you want your comment section to be.
  9. Find the section to define configuration variables and make it look like this:
    var disqus_config = function () {
        this.page.url = '{{@blog.url}}{{url}}';
        this.page.identifier = '{{id}}';
    };
    

Happy blogging!