0%

hexo 安装

前提

Nodejs

Git

安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ npm install hexo

added 89 packages, and audited 90 packages in 20s

15 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities

$ ll
总用量 68
drwxr-xr-x 89 umpay umpay 4096 5月 10 20:23 node_modules
-rw-r--r-- 1 root root 49 5月 10 20:23 package.json
-rw-r--r-- 1 root root 61165 5月 10 20:23 package-lock.json
  1. 将 Hexo 所在的目录下的 node_modules 添加到环境变量之中即可直接使用 hexo <command>
1
2
$ echo PATH='"$PATH:'$(pwd)'/node_modules/.bin"' >> /etc/profile
$ source /etc/profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$ hexo version
hexo-cli: 4.3.0
os: linux 2.6.32-696.el6.x86_64 CentOS Linux 6 (Core)
node: 16.15.0
v8: 9.4.146.24-node.20
uv: 1.43.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.18.1
modules: 93
nghttp2: 1.47.0
napi: 8
llhttp: 6.0.4
openssl: 1.1.1n+quic
cldr: 40.0
icu: 70.1
tz: 2021a3
unicode: 14.0
ngtcp2: 0.1.0-DEV
nghttp3: 0.1.0-DEV
hexo 操作指北
-------- 本文结束 感谢阅读 --------