How to add Disqus comments on my journal theme

I am using the journal theme for my blog and I want to add Disqus comments on every post/page, after googling a little bit I found some solutions but when I am altering the file post.hbs with the Disqus code, the theme doesn’t get uploaded it just gives me an error.

Is there an easy way to add Disqus comments to my blog.

The code I add in post.hbs is :

<section class="article-comments gh-canvas">
  <div id="disqus_thread"></div>
  <script>
    var disqus_config = function () {
      this.page.url = "{{url absolute="true"}}";
      this.page.identifier = "ghost-{{comment_id}}"
    };
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://SHORTNAME.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
  </script>
</section>

Those errors are usually pretty diagnostic. What’s it say?

Hi Cathy, the error says unknown or unsupported file type.

Are you uploading a .zip file?

Yes, of course, I am uploading a ZIP file.

Sorry Cathy, I was uploading a rar file, now that I uploaded a zip file it works.

Thank you very much

1 Like