Install Git
Download Msysgit and execute to complete the installation.
Install node. js
Installing node. js in a Windows environment is easy, just download the installation files and execute them to complete the installation.
Installing Hexo
Install with the NPM command. (Right click anywhere, choose Git bash)
Install -G Hexo
after the installation is complete, under your favorite folder (e.g. E:\hexo ), execute the following command (in H:\hexo Right-click inside the mouse button, select Git Bash ), Hexo automatically creates all the files needed for the site in the destination folder. Create a Hexo folder
Hexo Init
Install dependent packages
Install
Local view
Now that we have built a local Hexo blog, execute the following command ( E:\hexo ), and then go to browser input to localhost:4000 see.
Hexo Generatehexo Server
So far, the local blog has been built up.
Below, we're going to deploy to GitHub.
Register here for GitHub
Create repository
In the bottom right corner of your GitHub home page, create a new repository. For example, my GitHub account is zhangs1990, so the repository name I should create should be zhangs1990.github.io(必须与账号同名) .
Deployment
Edit _config.yml ( H:\hexo under). When you deploy, replace the following with zhangs1990 your account name.
Deploy: type:github Repository:https://github.com/zippera/ Zhangs1990.github.io.git Branch:master
Execute the following instructions to complete the deployment.
Hexo Generatehexo Deploy
about 10 minutes of waiting in the browser to access zhangs1990.github.io you can see it!
Tips
Hexo now supports simpler command formats, such as:
hexo g==hexo generate
hexo d==hexo deploy
hexo s==hexo server
hexo n==hexo new
Build Hexo Blog