- node官网下载安装包并安装,
a. URL:https://nodejs.org/dist/v6.9.2/node-v6.9.2-x64.msi - 下载git客户端并安装(安装github desktop更好),
a. URL:https://git-scm.com/download/win - 打开git命令行,
a. 安装hexo:
b. 初始化站点:npm install hexo-cli -g
hexo init hexo.blog
cd hexo.blognpm install - 执行”hexo server”就可以测试是否安装成功
- 访问http://localhost:4000/测试成功
- 部署hexo到github
- 在github上创建一个repository
a. 名称为fearchen/fearchen.github.io 在hexo.blog下的_config.yml下配置部署路径,注:冒号后面有空格
安装git插件:npm install hexo-deployer-git –save
- 然后在hexo.blog目录下执行”hexo deploy”
- 部署成功,https://fearchen.github.io/就能访问了
- hexo new “MyBlog” 新建一篇文章
- hexo generate生成静态页面
- hexo deploy重新部署
- 把写好的MarkDown文章放到source目录下的_post文件夹
- 然后部署
a. hexo clean
b. hexo deploy -g - 就能在hexo上看到了
- 相关配置需修改themes\maupassant下“_config.yml”配置文件
- 修改hexo主题,https://www.haomwei.com/technology/maupassant-hexo.html
a. git clone https://github.com/tufu9441/maupassant-hexo.git themes/maupassant
b. npm install hexo-renderer-jade –save
c. npm install hexo-renderer-sass –save
d. 编辑Hexo目录下的 _config.yml,将theme的值改为maupassant
e. hexo deploy -g