hexo博客的gitment评论开启一直失败
JJXiangJiaoJun opened this issue · 17 comments
按照教程上配的,我的github pages绑定了个人域名
https//:hongbb.top
OAuth配置如下,应该是没有错误的
_config.yml的配置如下,保证client_id 和 client_secret没有填错
comment:
gitment:
enable: true
owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID
repo: 'JJXiangJiaoJun.github.io' # 必填项 你的存储评论的repo
oauth:
client_id: 'd7df3d5d159f81371d76' # 必填项
client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项
redirect_uri: # 可以填也可以不填
设置后博客上显示 Error: Comments Not Initialized
点击 登录 按钮后,无法跳转到github授权界面
浏览器上信息为 https://hongbb.top/?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdeveloper.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch
看起来好像是call-back url填错了,不过我试了 原来的URL也没用
作者自己的官方blog一样的问题:Error: Comments Not Initialized
我的也是,我是在 hexo d 之后,刷新页面,页面显示Error: Comments Not Initialized
,点击Login
,然后会跳出对话框[object ProgressEvent]
,点击确定之后,Gitment区域就显示Logging in...
,会一直持续下去,并且Gitment区域不能操作
同样的问题
我的也是,昨天弄的,github登陆之后浏览器显示:
[object XMLHttpRequestProgressEvent],然后一直在转圈。。。loading commetns
可以看这里 https://sherry0429.github.io/2019/02/12/gitment%E4%BF%AE%E5%A4%8D/
你目前博客的gitment就会报object ProgressEven
不知道什么原因,我的icarus也是这种情况
我也遇到同样问题了 = =
解决了吗 我也是一样的问题哎 满脑子很糊涂
目前网上大部分解决方案都失效了,可以使用下面的方法解决:
打开你的blog本地仓库themes\next\layout_third-party\comments\gitment.ejs将
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
修改为:
<link rel="stylesheet" href="https://billts.site/extra_css/gitment.css">
<script src="https://billts.site/js/gitment.js"></script>
上面给出的是gitment汉化版
说一下本人的 解决办法 :
我的github pages绑定了个人域名
https//:hongbb.top
导致重定向一直错误,我只修改了_config.yml
中的 redirect_uri
, 就解决了问题,现在使用正常
comment:
gitment:
enable: true
owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID
repo: 'JJXiangJiaoJun.github.io' # 必填项 你的存储评论的repo
oauth:
client_id: 'd7df3d5d159f81371d76' # 必填项
client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项
redirect_uri: https//:hongbb.top #如果绑定了个人域名,这里一定要填上绑定的个人域名!!!!!!!!!!!!!
可以试试将redirect_uri
改成自己绑定的个人域名
按照楼上所说的方法,gitment没搞定.换了一个评论系统,gittalk ,https://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/这是教程地址..配置起来很简单..
关于不能初始化的问题,我在手机上解决了。这是什么情况?
说一下本人的 解决办法 :
我的github pages绑定了个人域名
https//:hongbb.top
导致重定向一直错误,我只修改了_config.yml
中的redirect_uri
, 就解决了问题,现在使用正常comment: gitment: enable: true owner: 'JJXiangJiaoJun' # 必填项, 你的GitHub ID repo: 'JJXiangJiaoJun.github.io' # 必填项 你的存储评论的repo oauth: client_id: 'd7df3d5d159f81371d76' # 必填项 client_secret: '3794527fca067871d3795782ae7fd14f94ce3a74' # 必填项 redirect_uri: https//:hongbb.top #如果绑定了个人域名,这里一定要填上绑定的个人域名!!!!!!!!!!!!!可以试试将
redirect_uri
改成自己绑定的个人域名
亲测无效
我的gitment 点击login后出现了下面的代码:
> <%- _partial('common/head') %> <%- _partial('common/navbar') %> <% function main_column_class() { switch (column_count()) { case 1: return 'is-12'; case 2: return 'is-8-tablet is-8-desktop is-8-widescreen'; case 3: return 'is-8-tablet is-8-desktop is-6-widescreen' } return ''; } %>
<%- body %>
<%- _partial('common/widget', { position: 'left' }) %> <%- _partial('common/widget', { position: 'right' }) %>
<%- _partial('common/footer') %> <%- _partial('common/scripts') %> <% if (has_config('search.type')) { %> <%- _partial('search/' + get_config('search.type')) %> <% } %>
有人解决这个问题吗,我的gitment也是一直开启不了
按照楼上所说的方法,gitment没搞定.换了一个评论系统,gittalk ,[https://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/这是教程地址..配置起来很简单](Car Gameshttps://yunhao.space/2018/07/04/hexo-next-gitalk-comments-tutor/%E8%BF%99%E6%98%AF%E6%95%99%E7%A8%8B%E5%9C%B0%E5%9D%80..%E9%85%8D%E7%BD%AE%E8%B5%B7%E6%9D%A5%E5%BE%88%E7%AE%80%E5%8D%95)..
"Thanks, great blog!"