1、git、nodejs安装
都是一直下一步,node安装稳定版,npm在弄得安装时自动安装
git
Nodejs
git -v 、node -v、npm -v
2、Hexo框架安装
1 | npm install hexo -g //hexo命令安装,hexo version |
以上都做完,博客就在本地搭建成功了
3、部署到GitHub
创建一个新仓库
Repository name: yzklov.github.io //用户名.github.io,固定格式
选择public,创建仓库
1 | git config --global user.name "yzklov" //github用户名 |
创建ssh密钥ssh-keygen -t rsa
//完成以后按直接三下回车跳过
将.ssh文件里的id_rsa.pub文件里的全部内容复制下来,在github->setting里创建密钥,名字是填github用户名,然后把内容复制进去
修改_config.yml文件
1 | # Deployment |
可以上传到github了