Hexo博客 更换设备
hexo博客部署在github上,由于更换电脑,需要重新搭建环境
前期准备
设置git全局邮箱和用户名
1
2git config --global user.name "yourgithubname"
git config --global user.email "yourgithubemail"设置ssh key
1
ssh-keygen -t rsa -C "youremail"
生成秘钥后,到显示的相应目录找到公钥,将对应的公钥填到自己的Github中
验证是否成功
1
ssh -T git@github.com
安装hexo
1
npm install hexo-cli -g
本地项目部署
- 将项目clone到本地
在要放的文件夹下1
git clone git@......
- 装好依赖
进入clone的文件夹下并安装1
2npm isntall
npm install hexo-deployer-git --save - 部署
1
2
3hexo cl
hexo g
hexo d
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 BingT` 博客!
