Hugo Quickstart

I’ve been dabbling with static site generators and I’ve been impressed with Hugo as it’s fairly straightforward. It only took a few days for me to convert the majority of my static sites to use Hugo and deploy them on Cloudflare which really showcases its ease of use. I’m just leaving my reference sheet below for when I inevitably forget how to use it again a few months from now.



sudo apt-get install hugo

For Debian systems, install the latest release by downloading the .deb package at Install the downloaded package:

sudo dpkg -i ./hugo_0.125.3_linux-amd64.deb

Create a new project

hugo new site my-hugo-site

You can find a theme at I’ll be using the Anatole theme

cd my-hugo-site
git init
git submodule add themes/anatole
git submodule update --init --recursive


The configuration file is in hugo.toml and sample settings are below.

baseURL = ''
languageCode = 'en-us'
theme = 'anatole'
title = 'David Ado'

summarylength = 20
enableEmoji = true
enableRobotsTXT = true

# Google Analytics
googleAnalytics = "G-**********"

# Syntax highlighting
pygmentsUseClasses = true   
pygmentsCodeFences = true
pygmentsCodefencesGuessSyntax = true

title = 'David Ado'
author = 'David Ado'
profilePicture = "/images/profile.jpg"
enableEmoji = true
enableRobotsTXT = true
readMore = true
relatedPosts = true
numberOfRelatedPosts = 3
description = """
Full Stack Developer
Cloud Architect

## Social links
# use 'fab' when brand icons, use 'fas' when standard solid icons.
icon = "fab fa-linkedin"
title = "Linkedin"
url = ""

icon = "fab fa-github"
title = "GitHub"
url = ""


  name = "Home"
  identifier = "home"
  weight = 100
  url = "/"

  name = "Posts"
  weight = 200
  identifier = "posts"
  url = "/posts/"

  name = "About"
  weight = 300
  identifier = "about"
  url = "/about/about-me"


Images, favicons, and fonts go into the /static directory and is referenced in the url as if the file was found in root. So placing profile.jpg in /static would make it accessible at localhost:1313/profile.jpg. You can make subdirectories in /static such as /static/images which would make your image accessible at localhost:1313/images/image1.jpg.

Run server

hugo server

Create a post

hugo new posts/

Create a GitHub repository

Create a new GitHub repository at then run the following commands within your project directory.

git remote add origin<your-gh-username>/<repository-name>
git branch -M main
git push -u origin main

Deploy to Cloudflare Pages

  1. Login to your Cloudflare dashboard.
  2. Go to Workers & Pages > Overview > Create application > Pages > Connect to Git
  3. Select your repository and set your build settings.
  • Production branch: main
  • Build command: hugo
  • Build directory: public

Notable themes

Good for professional blogs: Anatole

Blog theme with a focus on images: Blist

Good for company sites: Up Business Theme, Spectral, Hugo Fresh

Good for portfolios: Creative portfolio

Good for galleries: Gallery, Gallery Deluxe