Recently I migrated my personal webpage from Firebase hosting to Cloudflare Pages and the jekyll build process was failing. A quick inspection of the logs suggested ImageMagick convert was not found in the build environment. Cloudflare useses Ubuntu 22.04.2 for the build process and asdf package manager.

To resolve the issue I set the UNSTABLE_PRE_BUILD environment variable as following,

asdf plugin add imagemagick && asdf install imagemagick 7.1.1-29 && asdf global imagemagick 7.1.1-29

Another issue leading to build failure was related to a text encoding problem in jekyll-scholar extenstion. The easiest solution is to specify UTF-8 encoding in build environment variables.


Comparatively the Cloudflare Pages response time is slightly slower than Firebase, but now the static site generation part is taken care by Cloudflare and their free plan is more generous and offer additional features.