Check the current version of Hugo by typing
hugo versionin the terminal (command prompt).
Download the latest version of Hugo from its releases page on GitHub. Make sure to download the
hugo_extendedversion. Choose the correct ZIP file according to your OS configuration. For example, my computer is using Windows 64 bit, so I’ll choose the
0.99.1will be changed according to the latest version available.
Go to the Hugo
binfolder on your local system. It might be in
C:\Hugo\bin. It can also be in a different path, depending on your initial setup of the Hugo environment (learn more on how to install the Hugo environment).
Replace the three files in this
readme.md) with the new files from the ZIP file you downloaded in step 2.
Make sure that the version has been updated by typing
hugo versionagain in the terminal (compare it to the old version found in step 1).
If you use Cloudflare Pages to deploy your Hugo site, you may need to update one more thing.
In step 5 of the Cloudflare Pages project creation guide, we use the “Environment variables” option to set the
We will need to update this variable value, so that in its next build, Cloudflare will generate the site using the new version that we now have in our local environment:
- Log in to your Cloudflare account.
- On the Cloudflare homepage, click the “Pages” tab in the left menu.
- Under your site’s project, click on “Settings” in the top menu.
- Click the “Environment variables” tab in the left navigation.
- Change the value of the
HUGO_VERSIONvariable to the new version you installed in your local environment (e.g.
0.99.1) and click the
Savebutton. Change it in both the Production environment and the Preview environment.