Migrate Blog from Hexo to Hugo
I’ve used Hexo for 9 years. While Hexo is still alive, themes are scarce, the visuals feel tired, and customization costs are high. Over the holiday, I decided to try migrating to Hugo.
Steps
Install Hugo
brew install go
brew install hugo
Note: newer Hugo versions can sometimes cause errors. When using HugoBlox, I hit startup errors. The fix was installing hugo@0.134.2
. If you see odd issues, try downgrading.
Use HugoBlox
HugoBlox is a higher‑level framework that simplifies theme customization and feature development. It’s flexible and feature‑rich.
Visit the HugoBlox template gallery and pick a theme. Paid themes don’t have an Edit button and must be purchased. I chose a free theme and clicked Edit, which jumps to GitHub. There, create a repo from the template. Once created, proceed with theme configuration.
Theme customization
Clone the repo locally. Refer to the official docs for simple customizations.
Examples:
- Enable site search
- Set favicon
- Configure share buttons …there are many options.
Migrate Hexo posts to Hugo
After theme setup, migrate posts. Since my site has run for years and URLs are indexed by search engines and other platforms, I need to keep URLs stable. That requires some work:
Change Hexo frontmatter
description
→summary
.Change Hexo frontmatter
addrlink
→slug
.Adjust Hugo permalink rules:
permalinks: blog: '/:year/:month/:day/:slug/' # Output: /2025/04/30/my-post/
Additional notes
Installing an older Hugo
Package managers like Homebrew may not provide older versions. If you hit the version issue above, install manually. Download a specific release from GitHub. For macOS, grab the darwin-universal.tar.gz
archive.
Copy the binary to your PATH:
mv $HOME/Desktop/hugo_0.134.0_darwin-universal/hugo /opt/homebrew/bin/
You may see a security warning; allow it under Privacy & Security. Then hugo version
should work.
Final Thoughts
That completes the migration — total time: one day.