Use hexo + github to build personal blog
Installation node.js
Install git environment
Since before the process of doing the project and node.js git is already installed, so the demo is no longer here, you can refer to other online tutorials
Installation hexo
Presumably it was here, you have already installed the node.js and git, let's start the installation hexo.
Create a folder in a disk
I chose the G disk, folder named BlogEnter the Blog folder, right-mouse button -> select Git Bash Here
Input
npm install -g hexo-cli
, after the wait period, as shown in FIG.
Input
npm install hexo -save
, after the wait period, as shown in FIG.
In the next step, I made Command Not Found
the case to find a solution on the Internet, so with the next steps
- In the Blog folder, create a new folder, named hexo
- Close the current Git Bash, enter hexo folder, right-mouse button -> select Git Bash Here. Or directly input in the current Git Bash
cd hexo
- Input
hexo init
after the initialization hexo environment, wait a period of time, as shown in FIG. - Input
npm install
, npm install dependencies, the wait period, as shown in FIG. - Input
hexo generate
orhexo g
generate static pages, after the wait period, as shown in FIG. - Input
hexo server
orhexo s
generate a local service, as shown below. Every time we finished the blog, you can now preview the local and then posted online to go. - Next, we visited in the browser
http://localhost:4000/
, as shown in FIG. This is the locally generated a blog. - Press Ctrl + C in Git Bash, turn off the current port services.
- Here, our local blog has been set up is complete. The next blog will describe how to connect with Github, the blog uploaded to the Internet