Switching to Halo
I was originally going to switch to a different WordPress theme, but I couldn't find one I liked. While searching around, I stumbled on this framework. One look at the admin UI and I fell in love with it instantly, so I switched to Halo right away. (Honestly, this was just me messing around: I'd originally planned to use Hexo; the butterfly theme really spoke to me, but posting with Hexo has no visual editor, which was a bit of a pain.)
Deploying Halo with Docker Compose
Docker is still pretty convenient. I followed the tutorial in the official Halo repo and deployed it with Docker Compose.
Here I just used the Docker Compose config from the official docs, Deploy with Docker Compose | Halo Documents.
At first I used MySQL, but the deployment hung, so I switched to PostgreSQL.
Configuring the Nginx Reverse Proxy
# vhost/halo.conf
}
Then restart nginx
sudo service nginx restart
Initializing the Site
Visit {your domain or IP}/console to run the initial setup.
Changing the Theme
After looking through a bunch, I went with the theme-stack theme. Just download it and install it from the admin panel.
Using Alibaba Cloud OSS
The plugin-alioss plugin can do this. You need to build it locally yourself. The build commands are below.
git clone git@github.com:halo-sigs/plugin-alioss.git
./gradlew.bat build
Luckily, everything went smoothly. It did report two encoding errors along the way, but they shouldn't be a problem.
Once it's built, just upload the artifact ./build/libs/XXX.jar to the install page in the Halo admin panel.
Then go to the Attachments page, open Storage Policy in the top right, and configure your OSS.
Importing Posts from WordPress
Just use the plugin-wordpress plugin.
After importing, I found that tags, categories, and so on were all gone, and the post formatting had some issues too. Nothing major, though; just fix them yourself and it's fine.
Configuring SEO
Import the sitemap into Baidu.
Halo enables the sitemap by default. Link: {your IP or domain}/sitemap.xml
