I plan to write more in 2019. As the result I have resurrected my personal site.
Previously I used Hexo + DigitOcean VPS to serve my personal site. The solution went out of date because Dropbox decided to drop support for some Linux distro. Mine unfortunately is part of the deprecated list otherwise I have been happy of the set-up before.
At first I wanted to reuse Hexo + DigitOcean VPS solution. This old solution depends on Dropbox to monitor file changes and force nginx to serve generated static site. The key to reuse is to bring its Dropbox dependency up to date. This approach was proven to be too hard.
Another approach, which is also a successful approach, is Hugo + GitHub Pages. We will focus on this.
Static site generator fit my needs perfectly. On the market there are many popular ones like Hexo, Jekyll, and Hugo. Functionality wise all three works fine because they all support composing rich format in MarkDown.
I like simple things
Why Github Pages?
Before the change, my personal site lives on DigitOcean. What I found out today is that bring back a machine to latest OS/software versions is really painful. I would like to avoid maintaining my own machine as much as possible.
Github Pages offers such advantages. - I don’t need to maintain my own machine, Github takes care of it. - It comes with version control by default. I get to travel between versions. I also get to see how my work evolves.
I don’t want to waste time repeating what has been said else where. Instead, I would mention things that I did differently during set-up.
- Hugo 从入门到会用
- 使用 Hugo 搭建个人静态博客 <– Talks about CI
- How to point a domain on Google Domains to GitHub pages
Overall procedure should be: 1. Create Github repos for both Hugo and Hugo/public. 2. Configure Hugo to generate content in Hugo/public. 3. Set up Github Pages to treat project repo as website. 3. Set up Google Domains DNS, like in reference item 5.
Once went through the references, we are ready to create contents. The workflow is
1 2 3 4
hugo new post/<post_name>.md hugo server -D --watch # maybe update sources in blog folder ./deploy.sh
- Spin up local server
- Write post
- Deploy to Github with script
Run into a problem when themes
even is not cloned locally into the themes/themesname.
The solution is to clonet the theme locally
git clone https://github.com/olOwOlo/hugo-theme-even themes/even
There are some smaller things I would like to tune:
- Create a more accurate about page.
- Learn how to change font.
- Learn how to add feature to the even theme.
- Create bash alias for common commands.