Hexo Blog
The first time I setup a Hexo blog was about 3 years ago. I was following a blogger’s instructions copying and pasting his code without knowing what I was doing. I finally reached a goal -– having my own Hexo blog with default settings. I did not continue writing anything in the blog. Because I have nothing to write about programming at that time. I went to polytechnic to study programming.I never thought I would shift my career to be a developer until this year. I find myself have great passion on coding. Interestingly, I looked back to the same blogger’s instructions recently after studying programming for one and half year. I totally understand those code now. I am thinking maybe I can write something now. So why not start from building my own blog…
Quick Start
Tips
Here are some tips I wish someone would tell me when I built a Hexo blog.
Rule for your GitHub repo name
When you create a repo on GitHub, do remember use the same name as your GitHub owner’s name. For example, my GitHub owner’s name is ‘cindy-xing-wang’, my repo name has to be ‘cindy-xing-wang.github.io’. If you do not follow the rule, the deployed blog will not be able to style correctly.
About themes
After you init a Hexo blog, the first thing to notice is that the latest version (5.0.0) of Hexo has nothing (except .gitkeep which is an empty file) under themes’s folder. If you want to see the file structure of the default theme (landscape), you can type this command in the terminal.
1 |
|
It will create a public folder and it contains the current using theme. Only public folder will be deployed to GitHub.
After built the blog, I browsed some other themes in Hexo themes. I decided to use theme Stun as it is still under maintenance and the documentation is really good.
More info:
- Try to build Hexo on macOS as some themes may not working on windows.
- I attempted to clone different themes. Some were not displaying the way I was expecting. During the process, I happened to know Hugo which is another blog building framework written in Go language. I haven’t tried it yet. If you want to find an easier way to build a blog maybe this is the way to go.