gitment
gitment copied to clipboard
现在是不是不能使用了, 我登入你的博客都提示下面的错误
已复现,我已经换到使用Gitalk 了
在其他issue看过这个,可以用这里的js,oauth用的github的:https://yajunw.com/2019/09/08/hexo/
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
老哥,这是改哪里啊,是 post.swig
吗
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
老哥,这是改哪里啊,是 post.swig
I think it's themes/next/layout/_third-party/comments/gitment.swig
, you can also set mint
to false
of field gitment
in themes/next/_config.yml
which have the same effect.
在其他issue看过这个,可以用这里的js,oauth用的github的:https://yajunw.com/2019/09/08/hexo/
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
此番操作有用,可以初始化了。
在其他issue看过这个,可以用这里的js,oauth用的github的:https://yajunw.com/2019/09/08/hexo/
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
亲测有效,直接替换掉原来的js文件,css文件不用动,多谢! It works, I replace the js file directly, without changing the css file, thanks very much !
在其他issue看过这个,可以用这里的js,oauth用的github的:https://yajunw.com/2019/09/08/hexo/
<script src="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/gitment.browser.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/theme-next/theme-next-gitment@1/default.css"/>
亲测有效,直接替换掉原来的js文件,css文件不用动,多谢! It works, I replace the js file directly, without changing the css file, thanks very much !
我的错误提示是跨域:
(index):1 Access to XMLHttpRequest at 'https://api.github.com/repos/sweetink/sweetink.github.io/issues' from origin 'https://githuboy.online' has been blocked by CORS policy: Request header field accept is not allowed by Access-Control-Allow-Headers in preflight response. gitmint.browser.js:3918 POST https://api.github.com/repos/sweetink/sweetink.github.io/issues net::ERR_FAILED
Nice Updated! https://www.tentdepot.ca/
修改gitment.browser.js文件的3416行将https://gh-oauth.imsun.net/
替换成:https://baifachuan.com:8443/
该服务器代码在:https://github.com/imsun/gh-oauth-server
,不会记录任何信息,我也是自己的博客使用:https:www.baifachuan.com
,因为该服务器需要https,所以构建在自己的服务下,需要的可以使用。修改后的代码为:
_utils.http.post('https://www.baifachuan.com:8443', {
code: code,
client_id: client_id,
client_secret: client_secret
}, '').then(function (data) {
_this.accessToken = data.access_token;
_this.update();
}).catch(function (e) {
_this.state.user.isLoggingIn = false;
alert(e);
});
} else {
this.update();
}
update the gitment.browser.js
file replace https://gh-oauth.imsun.net/
to https://baifachuan.com:8443/
.
This service won't record or store anything. It only attaches a CORS header to that request and provides proxy. So that users can login in the frontend without any server-side implementation.
Your article is very useful, the content is great, I have read a lot of articles, but for your article, it left me a deep impression, thank you for sharing. https://www.brandedcanopytents.com/