Cloudflare Pages fails to deploy Hugo Site

Error: “/opt/buildhome/repo/themes/PaperMod/layouts/shortcodes/collapse.html:3:1”: parse failed: template: shortcodes/collapse.html:3: function “warnf” not defined

In a previous post I explained how to use Cloudflare Pages and GitHub to deploy a Hugo Static Site.

In this post I explained how important it was to expand “Environment variables” and set the “Variable name” as HUGO_VERSION and “Value” as the version of Hugo you want Cloudflare to use, otherwise you may get an error.

Below is the error I was getting when I first tried to deploy without setting the values

Error

The way to fix this error is to specify the “Variable name” and “Value” (version of Hugo you want to use)

Settings

Colin


Also published on Medium