Article directory
Written before:
Reference for this article
Hexo builds a personal blog (1)
hexo builds a personal blog (2)
The specific steps have been written in detail in the video and article above, but because I am running a Windows system here, I encountered different problems than the above, including
The first pit
When it comes to deploying to GitHub,
hexo d
the following error appears when running (I still use cmd here)
After searching online for a long time, it seems that the problem is that git does not configure environment variables. You can choose to add the configuration again, or directly download Git and run it in git bash. Based on various factors (the bash command line is more friendly to me and I just want to adjust the location of the blog file because I am new to it), I chose to download Git directly.
You can download it from Git official website
But it’s generally very slow in China. For example, I couldn’t get in directly here, so I found this Git mirror.
The installation steps are the same as those of ordinary software. You can refer to Installing Git under Windows 10.
The second pit
.\blog\_config
After configuring your GitHub warehouse information in the file, run it directly andhexo d
it will appear.
In fact, the picture has already given a hint, you need to tell it who I am first, hexo d
type two lines before
$ git config --global user.email "你的GitHub注册邮箱"
$ git config --global user.name "你的GitHub昵称"
The third pit
git config
After typing the configuration command in the second pit above, I stillhexo d
get the following error message:
At this time, check the network, such as refreshing your GitHub homepage to see if the connection is normal and what the speed is. I finally found that it was mainly a network problem. I hung up the ladder and solved it directly. After success, the display is as hexo d
follows
Then enter hexo s
start
At this time, enter https://twocanis.github.io/
(taking my own ID as an example), wait for two seconds and refresh the interface (the connection refresh here requires response time), and it will be displayed normally and can be provided as an external link URL for others to access.