Installing Hugo & Creating A Test Site
Contents
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 aSites
subfolder and abin
subfolder - Unzipping the contents of the installer - the Hugo executable (
hugo.exe
),LICENSE
, andREADME.md
files - into thebin
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:
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:
And upon checking Windows Explorer:
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 ~~^~~
Author Damien Jones
LastMod 2019-10-01