Hexo博客首次搭建
1.注
本博客搭建基于Hexo和MDUI。以及参考了 聂明照 博主主题。
2.开始
2.1环境
本地:
| 序号 | 环境 | 版本 |
|---|---|---|
| 1 | OS | Windows 10 Pro 1903 |
| 2 | Node.js | v12.13.0 |
| 3 | Hexo | 4.0.0 |
| 4 | npm | 6.13.0 |
| 5 | Git | version 2.23.0.windows.1 |
本地安装略过…
服务器:
| 序号 | 环境 | 版本 |
|---|---|---|
| 1 | OS | 3.10.0-1062.1.2.el7.x86_64 |
| 2 | Node.js | v13.0.1 |
| 3 | hexo-cli | 3.1.0 |
| 4 | npm | 6.12.0 |
| 5 | Git | version 1.8.3.1 |
安装nvm node.js
- 网上介绍安装nvm基本是用官方的一键安装。貌似raw.githubusercontent.com從10月28號之後正式被dns污染。
先安装Git。安装完 git 之后,从github上clone NVM 项目源码到本地
git clone https://github.com/creationix/nvm.git |
执行下载下来的nvm文件
source nvm/nvm.sh |
安装和使用hexo
npm install -g hexo-cli |
至此博客已经初步完成。使用 hexo s 启动 http://localhost:4000/ 访问
更换Hexo主题 indigo
下载和更换indigo主题 https://github.com/yscoder/hexo-theme-indigo
git clone https://github.com/yscoder/hexo-theme-indigo.git themes/indigo |
安装依赖
npm install hexo-renderer-less --save #主题默认使用 less 作为 css 预处理工具。 |
更换主题
vim /www/wwwroot/hexo/_config.yml |
theme: indigo
重新生成启动
hexo clean && hexo g |

注:因为我是在服务器上先部署安装使用,后面部署本地的时候发现问题。所以前面那些配置都“白搞”
找不到原因,目前换了另一个主题。
ERROR Render HTML failed: index.html |
本部落格所有文章除特別聲明外,均採用 CC BY-NC-SA 4.0 許可協議。轉載請註明來自 Fungit!
評論