Rebuilding my blog with Hugo on Ubuntu
Table of Contents
I had been planning to create a personal blog for a while. I downloaded Hugo and a theme when I was using Windows, but never found the time to move beyond the initial setup.
After moving my laptop to Ubuntu, I decided to revisit the project. There were no customizations or published posts to preserve, so starting fresh made more sense than repairing the old setup.
Choosing where to host it
My previous plan was to generate the website locally and upload the finished files to Fastmail’s web hosting. Moving my email to Proton meant finding another home for the blog.
I chose Cloudflare Pages because it supports my own domain, fasouza.me, and lets me upload a website built on my laptop.
Cloudflare can also build Hugo projects from a Git repository. I considered that option, but preferred keeping a single build environment. If Hugo and the theme work together locally, I can upload the generated files without maintaining another Hugo installation in the hosting environment.
The local setup
The blog uses Hugo Extended, installed through Ubuntu’s App Center as a Snap package, and the Hugo Blog Awesome theme.
I added the theme as a Git submodule so the project records the revision being used. The site has English and Brazilian Portuguese versions, with English at the root address and Portuguese under /pt-br/.
Two scripts handle the everyday workflow:
testblog.shchecks for theme updates, starts Hugo’s local server with drafts enabled, and opens Firefox.publishblog.shcleans the previous output, builds the production website, and uploadspublic/using Cloudflare’s Wrangler tool.
The publishing build excludes drafts, future posts, and expired posts.
A small theme adjustment
The first preview showed a duplicated browser title: FASouza.me | FASouza.me.
The theme combined the page title and site title on every page, including the homepage. A local template override now displays the site name once on the homepage and keeps the Page title | Site title format elsewhere.
Keeping the override outside the theme directory lets me update the theme without directly changing its files.
Ready to write
The technical foundation is now in place. Hugo receives updates through Snap, the theme is checked when I start a preview, and publishing uses the files generated locally.
My next goal is to turn troubleshooting experiences, study notes, and personal projects into useful posts. This blog is also a place to record what I learn along the way.