technology Tutorial

How to Build a Static Blog with Hugo

Jun 03, 2026  ·  2 min read

Hugo is one of the fastest static site generators available. This tutorial walks through setting up a Hugo blog from scratch — installing Hugo, picking a theme, writing your first post, and deploying to S3 via GitHub Actions.

What you’ll have by the end: A live blog deployed to AWS S3 with a CI/CD pipeline that publishes on every push to main.

Hugo has two editions — make sure you install extended, which supports SCSS compilation.

Mac:

brew install hugo

Windows (via Scoop):

scoop install hugo-extended

Linux:

snap install hugo --channel=extended

Verify: hugo version — confirm it says “extended” in the output.

hugo new site my-blog
cd my-blog
git init

Hugo creates the scaffold: content/, layouts/, assets/, config.toml, etc.

Themes are added as Git submodules so you can pull updates independently.

git submodule add https://github.com/your-theme-repo themes/your-theme
echo "theme = 'your-theme'" >> hugo.toml

Check the theme’s README for any required config params and copy them into hugo.toml.

hugo new content/blog/my-first-post.md

Hugo creates a draft post with front matter. Open it, set draft: false, and write your content in Markdown below the --- separator.

hugo server --buildDrafts

Open http://localhost:1313. Changes reload live as you edit files.

Create .github/workflows/deploy.yml:

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: latest
          extended: true
      - run: hugo --minify
      - uses: aws-actions/configure-aws-credentials@v4
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1
      - run: aws s3 sync public/ s3://your-bucket-name --delete

Add your AWS credentials as GitHub repository secrets.

Top Article

blog-post
productivity

AI Writing Assistants

So what even is an AI writing assistant? Think of it like a very well-read friend who has absorbed an enormous amount of …

Jun 01, 2026 · 2 Min read

productivity

AI Writing Assistants — IRL

My actual daily workflow I use Claude for almost every post I write on this site. Not to write the posts — to work …

Jun 01, 2026 · 2 Min read