nodejs换源,成功安装hexo,搭建sanghongxv.gitee.io

今天配置hexo,发现现在网上的教程都安装失败,所有发此文。

npm使用国内镜像的方法

1、换成阿里源

npm config set registry https://registry.npm.taobao.org

2、验证命令

npm config get registry

返回https://registry.npm.taobao.org,说明镜像配置成功。

3、安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

4、使用cnpm安装hexo

cnpm install -g hexo

安装成功!!!

可能有错误,请大家留言。

接下来设置Hexo,看各位大佬的帖子就好了。

5、自己随意建一个文件夹:如hexo

6、使用命令进入此文件夹

7、使用命令hexo init 初始化

hexo init

8、使用 cnmp install hexo安装hexo

9、使用命令hexo server

hexo server

启动服务

10、本地访问http://localhost:4000/显示 下图即安装完成

上线发布看各位大佬的教程吧

个人空间:sanghongxv.gitee.io

猜你喜欢

转载自blog.csdn.net/SangHongxv/article/details/81204690