SSH添加到GitHub

1
2
git config --global user.name "yourname"
git config --global user.email "youremail"

yourname输入你的GitHub用户名,youremail输入你GitHub的邮箱

备份

1
2
3
4
5
6
7
source 文件夹(里面包含你的所有文章 _posts、图片等素材)。

themes 文件夹(你的博客主题,里面有你自定义的样式和配置)。

_config.yml 文件(博客的根配置文件,灵魂所在)。

package.json 文件(记录了你安装了哪些插件)。

打开命令行进入 D:\f 目录,执行安装插件命令(它会根据 package.json 自动把刚才没备份的 node_modules 重新下回来):

DOS
npm install

检查一下你有没有输对
1
2
git config user.name
git config user.email
然后创建SSH
1
ssh-keygen -t rsa -C "youremail"
hexo部署到GitHub

修改站点 _config.yml

1
2
3
4
deploy:
type: git
repo: https://github.com/账户名/账户名.github.io.git
branch: master
安装deploy-git

安装老版本

1
npm install -g hexo-cli@4.2.0 --registry=https://registry.npmjs.org/
1
npm install hexo-deployer-git --save
然后
1
2
3
hexo clean
hexo g
hexo d

source中创建一个名为CNAME文件写入域名

原作者

1
https://blog.csdn.net/sinat_37781304/article/details/82729029

hexo

安装软件0
. 点击安装软件0(上方)—已失效
. 完整11111
. f             
. f-             
. _p             
. 测试一下
. 记录笔记
. 还是不知道
. 不太完整
. 看看就知道了
. 看看就知道了
. 只是测试

1
2
3
4
5
6
7

npm install -g hexo-cli
hexo init f

npm install

hexo init f

环境变量 nodejs

我的电脑==-属性=-高级==- 变量(注意是系统变量非用户变量)
变量名填写:NODE_PATH。变量值就是nodejs的安装目录,点击浏览目录,找到nodejs的安装目录。然后确定

接着把 %NODE_PATH% 添加到path里