Documenting my experiences building a static site using Hugo: part 1
I chose to begin my SSG journey by purchasing and registering a domain. I did so through Namecheap, which was quick and convenient.
I built my SSG on using Windows 10, PowerShell, and chocolaty. The Hugo website details different installation procedures depending on your setup. Here was my process:
choco install hugo -ychoco install hugo -confirm, but you can override -y for automatic yes.hugo new site quickstart.user\<user-name>\quickstart.themes directory:cd quickstart
git init
git sumbodule add https://github.com/<name-of-repo>.git themes/<name-of-theme>
echo 'theme = "<name-of-theme>"' >> config.toml.content/<category>/<file>.mdhugo new posts/<file>.mdFiles require a Hugo-specific header:
title: "Title-here"
date: <date>
draft: <true>
Hugo allows you to set your posts to: draft, publishdate, and expirydate in the front matter header. This allows you to control when your content will be published.
Depending on your theme, there may be additional notes for the header. For example, my headers also include:
image = "img/portfolio/<image>"
showonlyimage = false
weight = ##
This establishes the home page design.
A wonderful benefit to Hugo is the real-time rendering of your website. While updating content and pages, I can monitor how the changes will be displayed.
To start the Hugo server with drafts active:
cd quickstart.hugo server -D.http://localhost:1313 information into Chrome.This render will update as you make local changes.
When finished, in the terminal, press ctrl+c to stop the render.
works folder and an img folder).