您的当前位置:首页正文

Hexo博客同时托管到github和coding

来源:花图问答

注册

创建项目

coding创建项目

项目名称最好和Coding用户名相同,这样最后直接访问hoxis.coding.me即可。

开启Pages服务

开启Pages服务

因为之前配置是master分支,所以这里Pages部署来源填master分支。

_config.yml文件配置

需要按如下配置,可以同时push到GitHub和Coding,需要将其中的代码仓库地址修改为自己的。

deploy: 
- type: git
  repo: 
  branch: master
  
- type: git
  repo: 
  branch: master

之前网上看的如下这种配置并不行:

deploy:
type: git
repo: 
       github: 
       coding: 

结果