Jack Moore

Email: jack(at)jmoore53.com
Project Updates

Hugo Static Sites

01 Mar 2022 » golang, website, static site

Hugo is a static site generator that is fast. It is very fast.

Install Go

# Pull down the latest Golang version
wget https://go.dev/dl/go1.17.7.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.7.linux-amd64.tar.gz

# I also add this line to ~/.profile
export PATH=$PATH:/usr/local/go/bin

# Testing out the go version
go version

Install Hugo

Steps to install Hugo:

# Update everything
sudo apt update && sudo apt upgrade

# Pull the latest hugo release
wget https://github.com/gohugoio/hugo/releases/download/v0.93.0/hugo_extended_0.93.0_Linux-64bit.deb

# Install the package
sudo dpkg -i hugo_extended_0.93.0_Linux-64bit.deb
sudo apt install -f 

Steps to create a site, add a theme and build the site:

# Create a new site
hugo new site example.com

# Change directories to it and add the theme
cd example.com
git init
git submodule add https://github.com/nodejh/hugo-theme-mini.git themes/mini
echo theme = \"mini\" >> config.toml

# Add a post, and start the server
hugo new posts/my-first-post.md
hugo server --bind 0.0.0.0

# To create the site in the ./public directory
hugo -D 
© Jack Moore - This site was last built Fri 30 Aug 2024 12:31:24 PM EDT