安装gitee-publish插件

repository
安装是全局安装
最好用国内源安装,即cnpm。

安装完后,在hexo的根目录创建conf.json文件

其中配置如下

{
"account": "你的gitee账号",
"password": "密码",
"repository": "对应要gitee pages服务开启的那个库名",
"outputimgpath": "脚本执行期间会生成快照,主要用于开始调试可以,后期还是不用的好,截屏并存储照片会浪费部署时间 默认 null"
}

创建你的执行gitee-publish的脚本文件

同样在你的根目录下创建你的 git-p.sh文件

创建


gitee-publish --conf D:/newblog/blog/conf.json
# D:/newblog/blog/conf.json 是你的conf.json在你磁盘上的绝对路径
# 部署参照 文章 https://gitee.com/hepingxm/gitee-pages-autopublish/issues/I1XF2Q
# cache 显示部署进度快照
# conf.json 部署配置文件
# gitee pages 自动部署
# 确定异地登录就可能有验证码验证就会导致登录不了

执行你的脚本文件gitee-publish

在根目录下打开git bash

执行success

执行过程可能报错那么这是正常的,其错误解决方法在其repository issue中可以查看到解决方法。