Here is the Windows installation
Without further ado, here we go
1. Install NodeJs
Hexo needs to be installed via NPM, and NPM requires Node, which now comes with NPM
- Download LTS (LTS) // Download LTS
- Installation steps: After downloading the MSI file, double click to open the installation, also all the way next
- Run the node -v command on the CMD console to view the version
Here you need to change the NPM into taobao’s image, otherwise the plug-in will be very slow, and can not be installed
npm install -g cnpm --registry=https://registry.npm.taobao.org
Use CNPM to install in the future
2. Install Git Bash
- Download address
- Installation steps: Double click exe file downloaded, all the way to Next
- Git Bash Here once installed, right click in any folder to get Git Bash Here
3. Install Hexo
- Start by creating a folder (to hold all the blog stuff) and go to the folder.
- Shift + right click // Click here to open the command window
- Install hexo command: CNPM I -g hexo
- After the installation is complete, check the version
If hexo is not installed
npm link hexo
It’s good - Initialization command:
hexo init
After initialization, open the folder and you can see the following files:
4. Set up Github (if you don’t have Github, register)
-
Github. IO, where yourname is your Github name. Github
-
The name should be the same as the previous Github name!
-
InInitialize this repository with a README
-
Go back to CMD console (set your github username and email address)
- Create a SSH
ssh-keygen -t rsa -C "[email protected]
To generate SSH.
- Open this file, copy the contents and go back to Github.
5, open the folder you just created and use the editor to open it_config.yml
Modified as follows:
- In the project
source
Create folderREADME.md
file
6. Right-click under the folder and select Git bash here
Input in sequence, not all at once, sentence by sentence!
hexo clean
hexo generate
hexo server
Copy the code
-
Open your browser and type http://localhost:4000
-
And then you’ll be laughing like a 200-pound kid
7. Upload to Github
Right click to go to Git Base! CNPM I hexo-deployer-git –save execute command (preferably do this after every change) :
hexo clean
hexo generate
hexo deploy
Copy the code
Go to Github and enter your project
8. Done! Open yourname.github.com
You will see something like this, click the underlined (many people have the suffix.io, and then there is no effect, you have to go to com first, and then click this, and then visit.io later.)
The hexo could not read form