0%

重装系统后hexo博客恢复

安装Git和Node.js

Git下载
Node.js下载

配置Git和Node.js环境变量

配置git个人信息,生成新的ssh密钥

1
2
3
git config --global user.name "xxxxxx"
git config --global user.email "xxxxxx"
ssh-keygen -t rsa -C "xxxxxxxx(邮箱)"

添加公钥

把.ssh文件里面的公钥复制出来粘贴到GitHub个人设置中的ssh

删除部分文件

打开原来博客的文件夹,除了_config.yml,theme/,source/,scaffolds/,package.json,.gitignore,其余删掉

运行npm

打开powershell输入npm install

npm install hexo –save

安装部署文件

npm install hexo-deployer-git --save

调试

1
2
3
hexo clean
hexo g
hexo d