Before we get started, let us install some tools on our computer that will help us build our site.
Hugo CLI
First we will install the Hugo Command Line Interface (CLI). The Hugo CLI will help us generate our project folder and provide us a development server so we can work on our site without any real servers.
MacOS
- Head over to the Hugo releases page and find the link that starts with
hugo_x.xx.x_macOS-64bit.tar.gz
. The x’s are for the version number which will be different. - Click that link to download the zip file.
- Extract the zip file to folder
/usr/local/bin
. - Open a new Terminal and write
hugo version
to verify that the command is working. You should see the version printed.
If you see the message
App can’t be opened because it is from an unidentified developer
head over toSystem Preferences
->Security & Privacy
->General
. You should see an option to clickAllow Anyway
next to the Hugo application.
Linux
- Head over to the Hugo releases page and find the link that starts with
hugo_x.xx.Linux-64bit.tar.gz
. The x’s are for the version number which will be different. - Click that link to download the zip file.
- Extract the zip file to folder
/usr/local/bin
. - Open a new Terminal and write
hugo version
to verify that the command is working. You should see the version printed.
Windows
Windows has a few extra steps compared to the other OS’s, but it is documented clearly in their official install page for windows. Follow those instructions and head back over when you are done.
VSCode
Any text editor made for editing code will be good, but it is recommended to use VSCode as it has an extensive extension library to make development faster.
Download VSCode here for any OS.
Troubleshooting
If you can’t find the folder /usr/local/bin
, then it means that it is not created yet. To create the folder, run sudo mkdir /usr/local/bin
.
sudo
means super user and allows you to run commands with elevated privileges, so it might ask you to fill in your computer’s password.