Local Installation Hexo steps
Note: This tutorial is for Windows users only, and for Linux and Mac users, please go to hexo installation.
- 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)
NPM install-g Hexo
After the installation is complete, under your favorite folder (such as H:\hexo), execute the following instructions (right-click within H:\hexo and choose Git bash), Hexo will automatically create all the files needed for the site in the destination folder. Create a Hexo folder
Hexo Init
Install dependent packages
Local view
Now that we have built the local Hexo blog, execute the following command (in H:\hexo), then go to the browser input localhost:4000 look.
Hexo Generate
Hexo Server
Well, at this point, the local blog has been built up, just local oh, others can not see. Below, we're going to deploy to GitHub.
Submit Hexo to GitHub step
Following is a summary of installation problems after installing Hexo, Bash:hexo:command not found
Locate C:\Users\Administrator\AppData\Roaming\npm\node_modules\hexo\bin\ and add this directory to the environment variable
Error Deployer not found:github occurred after executing hexo deploy
Hexo Update to 3.0, the deploy type of GitHub needs to be changed to Git
Repository path: Http://github.com/imsofter/imsofter.github.io.git (requires HTTPS to be modified to HTTP) not yet.
[Email protected]:imsofter/imsofter.github.io.git path
After you have changed, perform the NPM install hexo-deployer-git--save installation hexo for the GIT deployment tool.
And then try to deploy it again.
Verify error Error verification failed:
Error:host Key verification failed.
Fatal:could not read from remote repository.
Please make sure the correct access rights and the repository exists.
WORKAROUND: Conditional Sshkey
$ ssh-keygen-t rsa-c "[Email protected]"
Three times enter, you can set the password to empty
Add Id_rsa.pub from the generated C:\Users\Administrator.ssh directory to GitHub
Test if you can connect to GitHub,
$ SSH [email protected]
Hi imsofter! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
You can then push the code onto GitHub.
Bind domain Name
Create a CNAME file under the source directory
DNS settings
With Dnspod, fast, free, stable.
Register dnspod, add a domain name, such as settings.
Where A's two records point to the IP address that is provided by the GitHub pages IP
192.30.252.153
192.30.252.154
Hexo git configuration issue notes