在 jekyll 博客上安装 disqus 评论
我已按照 Disqus 页面上关于如何安装 disqus 评论的说明进行操作,但是,当我部署博客网站时,它不会加载。 我将disqus通用代码放入includes文件夹中,然后将其添加到post.html
文件中。 我在通用 disqus 代码中更改了以下代码:
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
};
在 post.html
文件中,我有:
{% include comments.html %}
还有其他我丢失的东西吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须将
this.page.url
放入字符串引号中,正如您从上面的代码中看到的那样。this.page.identifier
也是如此I had to put the
this.page.url
into strings quotes as you can see from the code above. The same goes for thethis.page.identifier