Specify Hugo Version In Netlify
Thinkinginbytes.com is generated using Hugo and hosted by Netlify. Netlify watches the site’s repo on Github and commits trigger a site build process. I’ll post more details about hosting a Hugo site with Netlify later. Site development is local. To view the site on a local machine, Hugo must be installed. It is likely that your local version of Hugo is versions ahead of the default Netlify Hugo version. This version mismatch may cause Netlify builds to fail. You may need to specify which version of Hugo you want Netlify to use.
Netlify Site Configuration
First, login to Netlify and select your site.
Next, select Site configuration
, then click Environment Variables.
Add Environment Variable
From Environment Variable, click on Add a variable
, then Add a single variable
.
Create Variable
In the Key
field enter “HUGO_VERSION”.
The Values
field should be the version of Hugo you want Netlify to build with.
Click Create variable
.
Adding this Environment Variable will force the build process in Netlify to use the Hugo version you specified.
NOTE: The version number should match the Hugo release information.