1. 程式人生 > >nodejs換源,成功安裝hexo,搭建sanghongxv.gitee.io

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