Skip to main content
Background Image

Resolving Cloudflare Deployment Issues After Hugo Blowfish Theme Update

·2 mins· loading · loading ·
miumiu
Author
miumiu
A software developer with over a decade of experience, previously specializing in payment systems and partner service integrations. I currently focus on developing internal back-office tools and MIS systems, and recently contributed to the integration of Korea’s central bank digital currency (CBDC) payment platform. Outside of my main profession, I manage a rental business with over 40 studio apartments. I also have a strong interest in global asset allocation and static investment strategy.

After neglecting my blog for a while, I decided to write an update and refresh my Hugo blog running with the Blowfish theme. However, after pulling the latest changes from the Blowfish repository and deploying, I encountered a build error on Cloudflare.

The Problem
#

I was using Hugo v0.141.0 in my local environment, but Cloudflare Pages was building with v0.128.0. This version mismatch caused the deployment to fail.

Root Cause
#

The issue stemmed from Cloudflare Pages’ v2 build runtime. The v2 runtime has limited support for Hugo versions and couldn’t use the latest version 0.141.0.

You can check the supported versions in the Cloudflare Pages official documentation.

Solutions
#

There were two possible solutions:

1. Upgrade to v3 Build Runtime
#

Update the build runtime from v2 to v3 in your Cloudflare Pages settings.

2. Specify Hugo Version via Environment Variable
#

Add HUGO_VERSION=0.141.0 to your environment variables to build with a specific Hugo version.

Build Command Optimization
#

Previously, I was simply using the hugo command, but I took this opportunity to optimize the build process:

hugo --gc --minify
--gc: Cleans up unnecessary cache files after build
--minify: Compresses and optimizes HTML, CSS, and JS files

Conclusion
#

With these changes, the deployment worked successfully in both local and Cloudflare environments, and the build output was better optimized as well.

Though I encountered this small issue while updating my blog after a long break, it gave me a chance to improve my build configuration. I hope this helps anyone using Hugo with the Blowfish theme!

Related

My Experience Using Hugo for Blogging
·3 mins· loading · loading
The journey to choosing the Hugo framework
I've taken on the role of Project Manager
·2 mins· loading · loading