美文网首页
Hexo 入门

Hexo 入门

作者: Lesss | 来源:发表于2019-03-26 10:41 被阅读0次

系统环境配置

要使用Hexo,需要在你的系统中支持Nodejs以及Git

安装Node.js

安装Git

安装Hexo

  • 第一步
 $ npm install hexo-cli -g

可能会出现如下错误

pm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz failed, reason: connect ETIMEDOUT 104.16.18.35:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wangjingjing/.npm/_logs/2019-03-26T02_03_43_683Z-debug.log

如果出现则执行命令

$ npm config delete proxy
  • 第二步
$ hexo init blog
  • 第三步
cd blog
$ npm install
$ hexo g # 或者hexo generate
$ hexo s # 或者hexo server,可以在http://localhost:4000/ 查看

相关文章

网友评论

      本文标题:Hexo 入门

      本文链接:https://www.haomeiwen.com/subject/vbwwvqtx.html