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.

Why Hugo?

I plan to create content includes which is a mixture of text, code, image, LaTex, chart, http links, and maybe even some JavaScript to offer interactivity.

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 picked Hugo because it is fast and have a simple mental model. Among these two, the latter characteristic close the deal for me. I would like something I can reason about two years from now. Hugo is simply a binary. It does not have endless dependencies and crazily dynamic host language (it is written in golang). Hexo and Jekyll in contrast are written in very dynamic languages like JavaScript and Ruby.

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.

Reference

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.

  1. Hugo静态网站生成器中文教程
  2. Hugo 从入门到会用
  3. Hugo建站踩坑记
  4. 使用 Hugo 搭建个人静态博客 <– Talks about CI
  5. 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.

Workflow

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
  1. Spin up local server
  2. Write post
  3. Deploy to Github with script

Error

Run into a problem when themes even is not cloned locally into the themes/themesname. The solution is to clonet the theme locally

1
git clone https://github.com/olOwOlo/hugo-theme-even themes/even

TODO

There are some smaller things I would like to tune:

  1. Create a more accurate about page.
  2. Learn how to change font.
  3. Learn how to add feature to the even theme.
  4. Create bash alias for common commands.