I always want to have my own blog. I really mean that a blog I could arrange it by myself. I do not like the CSDN blog which has a lot of advertisements.
Now finally I built one in one day.
1 What you need
1.1 github
github for sure. you should new a repository with name as user.github.io. For example, my repo name is “royaalto.github.io”.
1.2 Hexo
I deploy all the system under Linux. so install hexo first
1 | sudo npm install -g hexo-cli |
1.3 Fast forward
In fact, you can directly choose a existed theme on zhihu-how to build hexo and github instructions.
Choose a theme, directly copy the theme down. Then after git clone the repo. It is better to push it to your git as(you should new a repo name like hexo-theme)
1 | git remote -v |
1.4 Script I made to make it simple
push_to_github.sh
1 |
|
test_local_server.sh
1 |
|
1 |
|
有句话对我来说影响深刻,凡是一件重复事情用时超过30s的,我们就应该写一个脚本,是的,没错。