Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

现在是不是不能使用了, 我登入你的博客都提示下面的错误 #188

Open
liuyunzhuge opened this issue Jun 6, 2019 · 12 comments

Comments

@liuyunzhuge
Copy link

企业微信截图_20190606113234
企业微信截图_20190606113325

@AlotOfBlahaj
Copy link

AlotOfBlahaj commented Jun 8, 2019

已复现,我已经换到使用Gitalk

@yajw
Copy link

yajw commented Sep 11, 2019

在其他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"/>

@racla
Copy link

racla commented Sep 12, 2019

<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

@racla
Copy link

racla commented Sep 12, 2019

@Frost-Lee
Copy link

<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.

@ranying666
Copy link

在其他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"/>

此番操作有用,可以初始化了。

@wqw547243068
Copy link

在其他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 !

@SweetInk
Copy link

在其他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

@tentdepot
Copy link

Nice Updated!
https://www.tentdepot.ca/

@baifachuan
Copy link

修改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.

@Brandedcanopytent
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

14 participants