更多信息请关注 个人网站
将本地hexo项目部署到github上
(1)打开项目根目录下的_config.yml文件,配置deploy的相关信息,git地址为github创建好的仓库地址
deploy:
type: git
repo: git@github.com:redrose2100/blog_demo.git
branch: master
位置即文件如下:
(2)安装插件 hexo-deployer-git
npm install hexo-deployer-git --save
如:
D:\src\blog_demo>
D:\src\blog_demo>npm install hexo-deployer-git --save
added 1 package, and audited 336 packages in 3s
20 packages are looking for funding
run `npm fund` for details
8 vulnerabilities (1 low, 1 moderate, 1 high, 5 critical)
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
D:\src\blog_demo>
(3)部署到github上
hexo g -d
(4)在浏览器打开 https://redrose2100.github.io/blog_demo/
如下,github上的博客已经OK了