【问题标题】:Installing disqus comment on a jekyll blog在 jekyll 博客上安装 disqus 评论
【发布时间】:2022-08-14 13:10:18
【问题描述】:

我已按照 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 %}

还有什么我想念的吗?

    标签: jekyll blogs disqus


    【解决方案1】:
    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 
    };
    

    正如您从上面的代码中看到的那样,我必须将this.page.url 放入字符串引号中。 this.page.identifier 也是如此

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-10
      • 2013-08-27
      • 2021-04-16
      • 1970-01-01
      • 2013-04-16
      • 2023-03-12
      相关资源
      最近更新 更多