In this post we’ll be installing Hugo on my laptop.

Hugo is one of a number of static site generators, which are enjoying something of a resurgence in recent years with more people starting tech blogs (Hi there! - Ed) while not wanting or needing the features or resources of dynamic website builders like Wordpress. Much has been written about the benefits of static site generators, and rather than reiterate those points here I’ll instead refer anyone interested in further insight to Hugo’s own page to find out more.

As far as the installation itself goes, Hugo’s site has this extensively covered and includes a great YouTube video by Giraffe Academy for those of us like me who learn better by seeing things being done. I won’t reproduce the steps followed here as it’d simply be a duplicate of Hugo’s site, but at a high level the process involves:

  • Downloading the installer
  • Creating a Hugo folder locally, and within this a Sites subfolder and a bin subfolder
  • Unzipping the contents of the installer - the Hugo executable (hugo.exe), LICENSE, and README.md files - into the bin subfolder
  • Adding the file path of the Hugo folder to my Windows PATH settings

The outcome of this is that running the command hugo version in a CLI results in the following output regardless of where the CLI is pointing:

AWSB0001-01_Verify_Hugo_Path.png

Now for Hugo’s first test - we’re going to create a test website to confirm Hugo is set up correctly and to begin to see how Hugo structures itself on my hard drive. To do this, we need to access the Sites folder (Handy tip - in Windows 10 typing cmd over the file path in Windows Explorer opens a command prompt pointing at that location). Once there, the command needed is hugo new site example.com, which instructs Hugo to make a new site called example.com. The end result of this in the CLI is:

AWSB0001-02_Build_Sample_Site

And upon checking Windows Explorer:

AWSB0001-03_Example_Widows_Explorer

AWSB0001-04_Example_Subfolders

We’re now at the point of choosing a theme for Hugo to use. These are free and plentiful, and in the next post we’ll be choosing one for the example site and applying it to Hugo.

Thanks for reading ~~^~~