Step 1 npm安装
如已安装npm可以跳过本步骤。
在nodejs官网上下载nodejs
一路next安装下去并检查:
1 | 查看系统的环境变量 |
如上图所示即为安装成功。
如果需要配置自定义镜像提升速度,可以为NodeJS配置自定义的镜像,命令如下:
1 | npm config set registry=http://registry.npm.taobao.org |
检查配置信息
1 | npm config list |
1 | npm config get registry |
Step 2 安装hexo
1 | npm install hexo-cli -g |
然后测试一下hexo g & hexo s是否能生成博客就行了。