Installation
Preparation:
-Node.js (Should be at least nodejs 6.9)
-Git
-NVM (NVM for Windows)
Install Hexo:
After installed nvm, type the command below into cmdline:
$ npm install -g hexo-cli |
Build a Notebook
$ hexo init <folder> |
See Your Result On Server
Use the command below, and open http://localhost:4000
$ hexo server |
Git Deployment
install hexo-deployer-git
$ npm install hexo-deployer-git --save
Modify _config.yml
url: https://__username__.github.io
deploy:
type: git
repo: https://github.com/__username__/__username__.github.io
branch: [branch] #Notebook
message: [message] #leave this blank
- Note: username* is the user id of github.
- Note: github limits that the github page should be used in repository username.github.io and master branch.
Ref: How to Use Github Pages
- Enter the command:
$ hexo clean
$ hexo g #to generate static pages in public folder
$ hexo deploy
*Note: Have to update user.email and user.name for git first
*Note: if the
E:\Notebook>hexo deploy |