Skip to content

Latest commit

 

History

History
69 lines (46 loc) · 911 Bytes

hexo.md

File metadata and controls

69 lines (46 loc) · 911 Bytes

install nodejs

$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - 
$ sudo apt-get install -y nodejs

install npm

$ sudo apt-get install npm 
$ sudo npm install hexo-cli -g 

创建 blog

 $ hexo init blog
 $ cd blog
 $ npm install 
 $ hexo server

可以通过浏览器访问网址.

修改配置文件

$ vim _config.yml  (在最后一行增加)
----
deploy:
    type: git
    repo: https://github.com/github-name/github-name.github.io.git
    branch: master

网站进行布置

部署前需要生成网站, 每次修改后都需要重新生成网站。

$ hexo g
$ hexo d

常见问题

  1. ERROR Deployer not found: git

需要安装部署时使用的git包。

$ npm install hexo-deployer-git --save

参考

$ git clone https://github.com/wangleihd/leix.wang.git
$ cd leix.wang