Upgrading Hexo and Moving to Cloudflare Pages with AI Assistance
This blog has been dormant for quite some time. The last post was back in 2016, and the whole setup was running on Hexo 3.1.0 with FTP deployment. Fast forward to 2026, and I decided it was time to dust things off and modernize the stack. What I didn’t expect was how quickly it could be done with a little help from AI.
Disclaimer: This particular blog post was generated by Claude, Anthropic’s AI assistant, using Claude Code. The other posts on this blog were written by me, a human. I thought it would be fitting to have Claude write about its own work.
The Starting Point
The blog was in a pretty outdated state:
- Hexo 3.1.0 (current version is 8.1.1)
- Node.js 8.9.1 specified in
.tool-versions - FTP deployment with credentials stored in plain text in
_config.yml - Template files using the old
.jadeextension - Various deprecated packages like
hexo-renderer-jade,hexo-admin, andhexo-browsersync
The Migration Process
Updating Hexo and Dependencies
The first step was updating package.json with modern versions:
1 | { |
Configuration Updates for Hexo 8.x
Hexo 8.x introduced some breaking changes in the configuration format. The external_link setting changed from a boolean to an object:
1 | # Old format (Hexo 3.x) |
The highlight configuration also needed updates:
1 | highlight: |
From FTP to Cloudflare Pages
The old setup used FTP deployment via hexo-deployer-ftpsync. This is 2026, and we have better options now. Cloudflare Pages offers:
- Free hosting for static sites
- Automatic deployments from Git
- Global CDN
- Free SSL certificates
- Easy custom domain setup
Setting it up was straightforward:
- Push the repository to GitHub
- Connect the repo to Cloudflare Pages
- Set the build command to
npm run build - Set the output directory to
public - Add the custom domain
The .jade to .pug Migration
One issue that came up during deployment was that the Apollo theme used .jade template files. The modern hexo-renderer-pug package only processes .pug files by default. The fix was simple - rename all template files:
1 | for f in $(find themes/apollo -name "*.jade"); do |
Cloudflare Pages Configuration Gotchas
There were a few hiccups with the Cloudflare Pages configuration:
- The
.tool-versionsfile was specifying Node.js 8.9.1, which caused the build to fail - The
wrangler.tomlformat for Pages is specific - it needspages_build_output_dirat the root level, and doesn’t support a[build]section
The final working wrangler.toml:
1 | name = "blog-budiharso-info" |
Time Spent
Here’s the surprising part: the entire migration took about 15-20 minutes. This includes:
- Analyzing the existing setup
- Updating all dependencies
- Fixing configuration for Hexo 8.x compatibility
- Removing FTP deployment and setting up for Cloudflare Pages
- Debugging the Cloudflare Pages build issues
- Renaming template files from
.jadeto.pug - Multiple commits and deployments
Having an AI assistant that can read documentation, understand error messages, and make the necessary fixes in real-time made this process remarkably fast.
Final Thoughts
What would have taken a few hours of reading changelogs, Stack Overflow posts, and trial-and-error debugging was compressed into a quick conversation. The blog is now running on modern infrastructure with automatic deployments, and I didn’t have to manually sift through years of Hexo changelog entries.
Is AI-assisted development the future of maintaining legacy projects? For tasks like this - upgrading dependencies, fixing configuration drift, and migrating between platforms - it certainly seems promising.
Now, time to actually write some new content. The human way.