GitHub Comment 入门教程

GitHub Comment 是一款基于 GitHub 账号的第三方社会化评论系统。

准备工作

一个 GitHub 账号,一个公共的 Repo,一个该 Repo 下的已创建好的 issue。(以后会考虑自动创建 issue)

安装

在你的 html 中加入下面的内容:

<div id="github-comments"></div> <!-- 评论组件的容器 -->
<script defer="true"
  src="https://cdn.rawgit.com/teddy-ma/github-comment/v2.0.0/client/dist/bundle.js"
  id="github-comment" data-username="your-github-username"
  data-repo="your-github-repo" data-page-id="the issue number">
</script>

其中的配置项涉及到:

可参考 示例

自托管

如果你不喜欢使用第三方的服务想要自己托管 GitHub Comment。 可以查阅 相关文档