<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/rss/stylesheet/" type="text/xsl"?>
<rss xmlns:content='http://purl.org/rss/1.0/modules/content/' xmlns:taxo='http://purl.org/rss/1.0/modules/taxonomy/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:itunes='http://www.itunes.com/dtds/podcast-1.0.dtd' xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:atom='http://www.w3.org/2005/Atom' xmlns:podbridge='http://www.podbridge.com/podbridge-ad.dtd' version='2.0'>
<channel>
  <title>奇诺分享 | blog.ccino.cc - 重在分享</title>
  <language>zh-cn</language>
  <generator>microfeed.org</generator>
  <itunes:type>episodic</itunes:type>
  <itunes:explicit>false</itunes:explicit>
  <atom:link rel="self" href="https://blog-ccino-cc.pages.dev/rss/" type="application/rss+xml"/>
  <link>https://blog.ccino.cc</link>
  <itunes:author>奇诺分享</itunes:author>
  <itunes:image href="https://cdn-blog-ccino-cc.ccino.cc/blog-ccino-cc/production/images/channel-6ebae07c242a357bee27d74ca3e4b3ce.png"/>
  <image>
    <title>奇诺分享 | blog.ccino.cc - 重在分享</title>
    <url>https://cdn-blog-ccino-cc.ccino.cc/blog-ccino-cc/production/images/channel-6ebae07c242a357bee27d74ca3e4b3ce.png</url>
    <link>https://blog.ccino.cc</link>
  </image>
  <copyright>©2024</copyright>
  <item>
    <title>Hugo博客使用utterances作为评论系统</title>
    <guid>aGCkTkpFq6N</guid>
    <pubDate>Sat, 05 Oct 2024 12:52:42 GMT</pubDate>
    <itunes:explicit>false</itunes:explicit>
    <description>
      <![CDATA[<p>Hugo 博客上的评论插件一直试了好多，但网上关于 hugo 的评论插件是太少了，找了好长时间都没有值得考究的。如： Disqus、gitment、gitalk、来比力… 这些都是国外的，加载速度确实不敢恭维，就目前为止，Disqus 官网还被墙了，gitment 由于其开发者很久没有维护，gitalk 还算行，gitment、gitalk 这两个评论服务是通过 GitHub 提供的 API 创建含有相应标签的 issue。</p><ol><li>国内其实也有很多评论插件，如：有言（官网已经挂了）、畅言（搜狐出品）。还有来比力（韩国的，之前 hexo 博客用到过，加载速度也好慢），Valine（这个评论插件确实不错，但注册账号后还要用身份证号码信息认证，认证完后还要用支付宝扫码验证是不是本人的，基于安全考虑，暂时还是先不要用这个，不知道一个评论插件还要这么多程序）</li><li>其实第三方插件也还是要承担些安全责任的，发表不好的言论都是有些关系的。</li><li>Hugo 推荐 utterances 和 gitalk 评论插件来使用。</li></ol><h2>Utterances 是一款基于 GitHub issues 的评论工具</h2><p><br></p><p>相比同类的工具 gitment、gitalk 以及 disqus 评论工具，优点如下：</p><ol><li>极其轻量</li><li>加载非常快</li><li>配置比较简单</li><li>Disqus 这个工具配置也比较简单，也是免费的。但是，广告多，而且加载也比较慢。体验了一把 utterances 后，马上切换到 utterances。</li><li>Utterances 是基于 github issue，拥有多种主题的开源免费小组件。</li></ol><h2>Hugo 博客配置使用 utterances</h2><ul><li>首先在 github 上创建一个空仓库，如：hugoblogtalks，并且初始化设置，仓库必须是 Public，而不是私有的，这样我们的读者才可以查看以及发表评论。&nbsp;<img src="https://pic.ccino.win/OB/2024/10/202410052029629.png"></li><li>接着就是在 hugo 的配置文件（config. Toml）中启用 utterances，打开 config. Toml，添加如下：</li></ul><pre class="ql-syntax" spellcheck="false">## 配置 utteranc评论,教程参考 https://utteranc.es/
[params.utteranc]
  enable = true
  repo = "yunxd/hugoblogtalks" ##换成自己得
  issueTerm = "pathname"
  theme = "github-light"
</pre><p><br></p><p>Repo 的格式为：github 用户名 / 创建的仓库名</p><h2>Github 上安装 utterances</h2><ul><li>首先必须在 github 上进行安装 utterances，访问&nbsp;<a href="https://cloud.tencent.com/developer/tools/blog-entry?target=https%3A%2F%2Fgithub.com%2Fapps%2Futterances&amp;source=article&amp;objectId=1834230" rel="noopener noreferrer" target="_blank">utterances 应用程序</a>&nbsp;然后点击 Install 按钮进行安装。</li><li>在这里可以选择可以关联的存储库，可以选择我们所拥有的库 (也包括未来建立的库) 或者某一个仓库，这里只选择某一个需要进行评论的库，这样比较好。</li></ul><p><img src="https://pic.ccino.win/OB/2024/10/202410052030935.png"></p><ul><li>安装完成即可，随后访问&nbsp;<a href="https://cloud.tencent.com/developer/tools/blog-entry?target=https%3A%2F%2Fgithub.com%2Fapps%2Futterances&amp;source=article&amp;objectId=1834230" rel="noopener noreferrer" target="_blank">utterances 应用程序</a>&nbsp;就不再是安装而是是执行配置项目。</li></ul><p><br></p><p><img src="https://pic.ccino.win/OB/2024/10/202410052031467.png"></p><p><img src="https://pic.ccino.win/OB/2024/10/202410052031677.png"></p><ul><li>此时服务端配置已经完成，接着访问博客测试下评论。&nbsp;<a href="https://cloud.tencent.com/developer/tools/blog-entry?target=http%3A%2F%2Fhugo.xdr630.top%2F&amp;source=article&amp;objectId=1834230" rel="noopener noreferrer" target="_blank">http://hugo.xdr630.top/</a></li></ul><p><br></p><p><img src="https://pic.ccino.win/OB/2024/10/202410052032764.png"></p><p><a href="https://blog.ccino.org/tags/hugo/" rel="noopener noreferrer" target="_blank">Hugo</a></p><p><a href="https://blog.ccino.org/tags/github/" rel="noopener noreferrer" target="_blank">Github</a></p><p><br></p>]]>
    </description>
    <link>https://blog.ccino.cc/i/hugo-blog-uses-utterances-as-comment-system/</link>
    <itunes:image href="https://cdn-blog-ccino-cc.ccino.cc/blog-ccino-cc/production/images/item-bad1bb7ea67265e34cd297349098908f.png"/>
    <itunes:episodeType>full</itunes:episodeType>
    <enclosure url="https://blog.ccino.org/p/hugo-blog-uses-utterances-as-comment-system/" type="text/html"/>
  </item>
</channel>
</rss>