Intro
This may be big progress in my learning road,lol.
All in all, I implemented my first blog based on GitPage + Hexo. After several days struggles, I finally accomplished the basic framework of it. So I try to record how I did this ^.^.
This article would consists of three part:
- Install Hexo
- Hexo Instruction
Install Hexo
Hexo environment configeration
Just before installing Hexo, we need to install some dependencies. I use Homebrew to install them, so I recommend Mac’s users to use homebrew. Very helpful~
Please have Homebrew installed first.
Git
Open your terminal and type:
|
|
Use Homebrew to install, Git would be installed in /usr/local/Cellar/git/.
Node.js
|
|
Use Homebrew to install, Git would be installed in /usr/local/Cellar/node/.
Hexo
Open your terminal and type:
|
|
Wow, finished!
If we want to update our hexo, simply type:
|
|
Then, we initiate a folder to save files of your site:
|
|
Wait a second, we will see
|
|
Yeah, we finished!
Hexo Instruction
Create a new post
|
|
Run server
|
|
or
|
|
then we can debug our site in localhost.
Generate static files
After we new a post, we will have .md file under /yourBlogFolder/source/_post folder. Use this instruction to generate static files(html) for this .md
|
|
or
|
|
Deploy
Once you think your modification finished, just deploy it to your git.
|
|
or
|
|