node安装hexo
全局安装hexo脚手架1cnpm install hexo-cli -g
hexo初始化项目文件夹1hexo init hexoBlog
进入文件夹,安装依赖12cd hexoBlogcnpm install
本地浏览http://localhost:4000/12hexo serverhexo s
github部分
新建仓库,仓库名称和用户名一样,并认证邮箱1234new repository用户名: pengrongjie仓库名: pengrongjie.github.io
git部分
配置github ssh-keygen
在hexoBlog,右键Git Bash here,输入邮箱名字1输入 ssh-keygen -t rsa -C "352938347@email.com"
提醒你输入key的名称,你可以不用输入,直接3个回车,就OK了;
在C:Documents and SettingsAdministrator下产生两个文件:id_rsa和id_rsa.pub
用记事本打开id_rsa.pub文件,复制内容,在github的网站上找到ssh密钥管理页面,添加新公钥 。
在git bash中输入ssh -T git@github.com命令,出现Hi sylujia! You’ve successfully authenticated表示成功。
本地注册
|
|
回到hexo
安装next主题
|
|
修改外部_comfig.yml1theme: next
把本地的博客内容同步到 Github 上
安装依赖
|
|
配置外部_comfig.yml1234deploy: type: git repo: git@github.com:pengrongjie/pengrongjie.github.io.git branch: master