First, build a blog
1.1.1 Installation nodejs
Official website: https://nodejs.org/en/
After downloading, open the can has been the next step.
To see if the installation was successful
$ node -v
v12.10.0
1.1.2 install Git
Windows: Download and install https://git-scm.com/download/win
1.1.2.1 git settings
Configure push the user name and mailbox
$ git config --global user.name “github’s Name”
$ git config --global user.email “[email protected]”
$ git config --list
Generate ssh key file:
$ ssh-keygen -t rsa -C "github的注册邮箱"
Found under the C drive User→用户名→.ssh→id_rsa.pub
to copy the contents inside to github user avatar in setting
the SSH and GPG keys
→ New SSH key
inside
1.2 download source replacement
Download cnpm by npm, to improve download speeds of Hexo
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
After downloading the source for good,
1.3 Installation Hexo
$ cnpm install -g hexo-cli
1.4 build blog
First find a path, a new folder to hold the files created Hexo
$ mkdir blog
Initialization Hexo
$ hexo init
Two, github set
2.1 to create a new warehouse
Warehouse's name and account name consistent
set a theme
Find the setting, to pull down, to find Github Pages, select a topic, and then determine
1.5 push to github blog
- Installation hexo-deployer-git
$ npm install hexo-deployer-git --save
- Edit _config.yml file
deploy: type: git repository: github上仓库的ssh的地址 branch: master
- Local Deployment blog
hexo s
URL input:localhost:4000
you can - Remote push Website
- As an exception occurs due to the cache, clear the cache command can be executed before generating the command:
hexo clean
- Generate static files:
heox generate
- Pushed to the website:
hexo deploy
ordexo d
- As an exception occurs due to the cache, clear the cache command can be executed before generating the command:
[Reference link]:
6. One-the Command Deployment
7. HEXO official document
8. NexT theme official website