文章目录

1、安装nodejs,点击安装包,将会安装node和npm(包管理工具)

国内taobao下载  官网下载  百度云 node 文件夹 密码: dwna

1
2
3
4
$ node -v
v4.4.2
$ npm -v
2.15.0

2、安装 Hexo

1
$ sudo npm install hexo-cli -g

N分钟后……,建议将其换为淘宝源 npm install -g cnpm --registry=https://registry.npm.taobao.org

1
2
3
4
5
$ sudo npm install hexo-cli -g
Password:
> [email protected] install /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-fs/node_modules/chokidar/node_modules/fsevents
……
└── [email protected] ([email protected])
1
2
3
4
$ mkdir Hexo
$ cd Hexo
$ hexo init
$ npm install
1
2
3
$ hexo generate
$ hexo server
$ hexo d --g
1
2
3
4
5
6
$ cd Hexo
$ ls
$ hexo init
INFO Cloning hexo-starter to ~/Documents/Hexo
……
INFO Start blogging with Hexo!
1
2
3
// 配置好文件后
$ npm install hexo-deployer-git --save
$ hexo d --g
1
2
3
4
5
$ sudo npm install -g react-native-cli
Password:
/usr/local/bin/react-native -> /usr/local/lib/node_modules/react-native-cli/index.js
……
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
1
2
3
4
$ sudo npm uninstall -g react-native-cli
Password:
unbuild [email protected]
localhost:documents guohaitao$ sudo cnpm install -g react-native-cli

镜像源

1
2
npm config set registry=https://registry.npmmirror.com
$ npm install -g cnpm --registry=https://registry.npmmirror.com

node + hexo
v12.16.2

参考资料


0、使用npm安装一些包失败了的看过来(npm国内镜像介绍)

1、使用GitHub和Hexo搭建免费静态Blog

文章目录