Solving Disqus comment problem on Jekyll - same comments everywhere
I have been using Disqus in order to handle blog comments for a long time. I was also using it when I was with Ghost. It’s a great and good looking way to handle comments. It makes your blog more mobile. It has one downside which is that the comment box is iframe so I don’t think it’s good for SEO.
Disqus’s own help center:
With this light here is my disqus snippet in my jekyll code:
<div id="disqus_thread"></div>
<script type="text/rocketscript">
var disqus_shortname = 'YOUR_USERNAME';
var disqus_identifier = '/jekyll/2015/08/24/jekyll-disqus-same-comment-everywhere/';
var disqus_url = '\{\{ site.url \}\}\{\{ page.url \}\}';
var disqus_title = '\{\{ page.title \}\}';
var disqus_category_id = '\{\{ post.category \}\}';
Trick is assigning a unique identifier to the disqus_identifier javascript variable. In our case page.url is pretty unique. And also we are not supposed to assign same thing to disqus_identifier and disqus_url. So url is the full url with site info, identifier is the relative path.
Enjoy!