hexo localhost

JingLisen 2020-01-06

??安装git
https://git-scm.com/download/win
$ git --version
git version 2.21.0.windows.1

??安装node.js
https://nodejs.org/en/
$ node -v
v12.14.0
$ npm -v
6.13.4

??安装hexo
??可以更改为国内的镜像源
$ npm get registry 获得原来的镜像地址
https://registry.npmjs.org/
$ npm config set registry http://registry.npm.taobao.org/ 淘宝镜像
$ npm install -g hexo
$ hexo --version
hexo-cli: 3.1.0
os: Windows_NT 6.1.7601 win32 x64
node: 12.14.0
v8: 7.7.299.13-node.16
uv: 1.33.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 72
nghttp2: 1.39.2
napi: 5
llhttp: 1.1.4
http_parser: 2.8.0
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019c
unicode: 12.1

??初始化
$ mkdir selfblog
$ cd selfblog/
$ hexo init

??生成+本地预览
$ hexo s -g
INFO Start processing
INFO Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

相关推荐