Setup Part 1: Installing Hugo and Choosing a Theme - A Straightforward Guide

In this segment, we’ll guide you through the process of installing Hugo and selecting a theme. Let’s embark on this adventure together, with the same wit and practicality you’ve come to expect.

First, create a repository on GitHub (or a similar platform) and clone the new repository into a directory on your computer.

% mkdir statistical-bias
% cd statistical-bias
% git clone git@github.com:zaandahl/statistical-bias.git

To install Hugo and set up a theme, we primarily followed the Quick Start guide on gohugo.io, with one notable change: using Git subtree instead of Git submodules.

Install Hugo on my MacBook with homebrew

% brew install hugo

Create the site framework using Hugo and move or copy the files and directories created in your Git repo directory:

% hugo new site statistical-bias

Select a theme from the library at gohugo.io and add it to your new site using Git subtree. For this page, we chose the Whisper theme.

% cd statistical-bias
% git subtree add --prefix themes/hugo-whisper-theme https://github.com/zerostaticthemes/hugo-whisper-theme.git master --squash

Lastly, copy the theme’s exampleSite into the root folder site directory:

% cp -a themes/whisper/exampleSite/. .

To test the new server, you can execute the following command and visit localhost:1313:

% hugo server

And there you have it! You’ve now successfully installed Hugo and picked a theme for your page. Up next, we’ll explore customising the theme and other essential steps in your publishing journey.