Andrews
Andrews

Reputation: 43

Installing disqus comment on a jekyll blog

I have followed the instruction on the Disqus page on how to install disqus comment but, it does not load up when I deploy my blog site. I put the disqus universal code into the includes folder and then added it in the post.html file. I changed the following code in the universal disqus code:

var disqus_config = function () {
    this.page.url = {{ site.url }}{{ page.url }}; // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = {{ page.url }}; // Replace PAGE_IDENTIFIER with your page's unique identifier variable 
};

In the post.html file I have:

{% include comments.html %}

Is there something else I am missing?

Upvotes: 0

Views: 247

Answers (1)

Andrews
Andrews

Reputation: 43

var disqus_config = function () {
    this.page.url = "{{ site.url }}{{ page.url }}"; // Replace PAGE_URL with your page's canonical URL variable
    this.page.identifier = "{{ page.url }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable 
};

I had to put the this.page.url into strings quotes as you can see from the code above. The same goes for the this.page.identifier

Upvotes: 1

Related Questions