Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

Gitment4typecho 帮助文档

Tasker edited this page Aug 5, 2018 · 1 revision

作者:Taskeren

Github OAuth Application 注册

  1. 进入APP新建页面
  2. 随便填入一个名字到 Application name,这会显示在登陆时登陆的机构名称。
  3. 在 Homepage URL 中填入网站的URL。
  4. 随便在 Application description 中写一点注解。可有可无。
  5. 在 Authorization callback URL 中填入网站的URL。
  6. 注册,点击 Register Application。
  7. 注册后将跳出 Application 控制界面,记住 Client IDClient Secret

Typecho控制台 配置

  1. 将 插件 导入到Typecho。
  2. 启用插件
  3. 点击设置,进入设置页面。
  4. id 中填入一个不同页面会改变的值。推荐为 “location.href”。
  5. owner 中填入注册 Application 的 Github ID。
  6. repo 中填入用于存储评论的项目名称。如果没有可以新建一个,不需要任何东西,只要保证能用 Issue。
  7. client idclient secret 中填入 Github OAuth Application 注册 中的 Client IDClient Secret
  8. 如果您使用的是自定义的主题,请确认您的评论所在的 DIV 的 id 为 comments,否则您需要在 原评论元素 中填入当前主题的评论 DIV(使用jQuery选择器)和在 新评论DIV元素 中填入当前主题的评论 DIV 的 id(只可是DIV的id)。

启用 Gitment 评论

  1. 在每次新发文章之后,在文章页面内使用注册 Application 的 Github ID 登陆,登陆后将看到 Initialize Comments 字样的按钮,点击启用。(有时会刷不出来,刷新一下页面即可)
Clone this wiki locally