Install and inspect Git, Node.js and hexo

1
2
3
4
5
git --version
node -v
npm -v
npm install hexo-cli -g
hexo -v

The familiar command in hexo

首先 cd 到 hexo 的安装目录,最好是用 git bash 运行以下命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
一、常见命令:
hexo new “postName” #新建文章
hexo new page “pageName” #新建页面
hexo generate #生成静态页面至public目录
hexo server #开启预览访问端口(默认端口4000,'ctrl + c’关闭server)
hexo deploy #部署到GitHub
hexo help # 查看帮助
hexo version #查看Hexo的版本
二、缩写:
hexo n == hexo new
hexo g == hexo generate
hexo s == hexo server
hexo d == hexo deploy
三、组合命令:
hexo s -g #生成并本地预览
hexo d -g #生成并上传

Reference