换电脑重配置博客

Yes, I have done it elegantly and efficiently.

软件安装

配置git+ssh key

1
2
git config --global user.name "username"
git config --global user.email "xxx@xxx"
1
ssh-keygen -t rsa -C "xxx@xxx"

一直回车……
户主目录下生成.ssh目录,id_rsa和id_rsa.pub为SSH key密钥对,id_rsa是私钥,id_rsa.pub是公钥。复制id_rsa.pub内容到github add new key. (personal setting->ssh and GPG->New SSH key)

博客部署

创建博客文件夹。右键Git Bash Here

1
npm install -g hexo
  • 复制这些原文件替换

(根目录)_config.yml, theme, source, package.json, .gitignore, node_modules

然后hexo s看看本地链接成功?YES!It’s done!