Recently I’ve been organizing the event system I wrote earlier: DidaEvent, and I created a documentation site for it. I used Hugo as the site generation system, and the experience was quite good, so I decided to migrate the blog from WordPress to Hugo.
Why migrate
Actually, I used to be somewhat averse to static site solutions. First, compared with the traditional direct online editing approach, it is less intuitive; second, a solution with a server feels more flexible.
However, the cost of maintaining a server myself is still relatively high. Although I used WordPress, I am not very optimistic about the development of PHP, and it is also relatively heavy.
From past experience, servers often need to be migrated due to renewal, maintenance, and other reasons, which means the blog has to be reworked each time. This also makes writing more costly and hard to sustain.
Therefore, static site solutions such as Hugo stand out for their advantages: first, there are free hosting options; second, writing directly in Markdown also makes it easier to flexibly use the tools at hand.
And if special modules are really needed, I can actually customize some space and pages myself, so it should also meet my current needs.
Why choose Hugo
There are many static site generators to choose from, such as Jekyll, Hexo, and so on. Why choose Hugo?
Hexo uses Node.js and has a slower generation speed, so I no longer considered it.
Jekyll has official Github support and can be deployed directly on Github. However, I tried a Jekyll theme and felt it was too complicated.
Also, I actually wanted the data source to be separate from the final generated files, which makes management easier.
In the end, I chose Hugo: first, there was a suitable theme; second, generation is fast; third, the Golang language it uses is one I am relatively optimistic about.
The theme used for the DidaEvent documentation is Doks, and the theme used for the blog is Stack.
Migration process
After simply deploying the framework, I felt quite satisfied with the overall result.
The remaining task was to migrate the original WordPress posts. I had already prepared to copy them bit by bit, but fortunately I found a plugin: wordpress-to-hugo-exporter.
After exporting with the plugin, I got an archive of the posts, then made some simple adjustments according to my own needs, and a basic blog was set up.
However, there are some old posts and some images that still need to be organized, so I’ll slowly renovate them later.
Comment section configuration
I still ran into some trouble when configuring the comment section. See: Giscus configuration in Hogo