Hexo
初始化项目
安装Hexo框架
安装Node.js
Node.js是JavaScript运行环境,支持JavaScript运行在服务端的开发平台
Node.js官网地址:https://nodejs.org/


查看node和npm版本

安装淘宝镜像源的cnpm管理器
1
| npm install -g cnpm --registry=http://registry.npm.taobao.org
|

使用cnpm安装hexo
1
| cnpm install -g hexo-cli
|


新建本地博客服务
新建文件夹并进入该目录

初始化hexo


启动本地服务

本地访问地址

创建新的文章

清理并生成

远端部署Github
创建一个新的仓库
1
| YourGithubName.github.io
|

在Blog目录下安装git部署插件
1
| cnpm install --save hexo-deployer-git
|

配置_config.yml


部署到Github远端

查看博客
1
| https://YourGithubName.github.io/
|

修改主题
选择主题-Butterfly
1 2 3 4
| //官网 https://butterfly.js.org/ //Git仓库 https://github.com/jerryc127/hexo-theme-butterfly
|
主题下载
1 2
| //克隆到themes目录下的butterfly文件夹 git clone https://github.com/jerryc127/hexo-theme-butterfly themes/butterfly
|

修改配置_config.yml

执行命令
1
| npm install --save hexo-renderer-jade hexo-generator-feed hexo-generator-sitemap hexo-browsersync hexo-generator-archive
|

清理缓存
生成静态文件
运行本地服务
部署远端
