hexo搭建博客上传至github

时间:2021-01-28 06:23:23

准备工作

  • ssh key 要先申请好,并且添加至github的ssh库中
  • 安装插件 hexo-deployer-git
npm install hexo-deployer-git --save

配置

配置 _config.yml 文件

deploy:
type: git
repository: git@github.com:username/username.github.io.git
branch: master

提交

$ hexo generate
$ hexo deploy