# 对于 hexo 部署到 github 上时出现错误

如:
fatal: unable to access 'https://github.com/aynya/aynya.github.io.git/': Failed to connect to github.com port 443 after 21080 ms: Could not connect to server FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html

# 第一步

// 取消http代理
git config --global --unset http.proxy
// 取消https代理
git config --global --unset https.proxy

# 第二部重启 vscode

hexo clean
hexo g
hexo d

# 对于部署后 shoka 主题图床无法正常显示

themes\shoka\scripts\helpers\engine.js 中修改

var parseImage = function(img, size) {
    if (img.startsWith('//') || img.startsWith('http')) {
      return img
    } else {
      // return 'https://i0.wp.com/' + `tva${randomServer}.sinaimg.cn/` + size + '/' + img;
      return 'https://image.baidu.com/search/down?url=' + `https://tva${randomServer}.sinaimg.cn/` + size + '/' + img;
      // return 'https://tva'+randomServer+'.sinaimg.cn/'+size+'/'+img
    }
  }
hexo clean
hexo g
hexo d

再次部署就可以正常显示了


# 参考资料

https://blog.csdn.net/m0_56699208/article/details/139141778
https://github.com/theme-shoka-x/hexo-theme-shokaX/issues/6