This guide walks through creating a fast, modern static blog using Hugo and hosting it for free on GitHub Pages—no server management required.
Prerequisites
On Windows:
- Install Git: Download from git-scm.com. During installation, select "Add Git to PATH" to avoid manual environment configuration.
- Install Hugo: Get latest extended version (required for SCSS/Sass support) from Hugo's GitHub releases. Choose the
.ziparchive, extract it, and place thehugo.exebinary in a permanent directory (e.g.,C:\tools\hugo). - Configure PATH: Add both Git’s
binfolder (e.g.,C:\Program Files\Git\bin) and your Hugo directory to the systemPATHvariable via System Properties → Environment Variables. Verify in a new terminal:
git --version
hugo version
Create Your Site
Open PowerShell or Command Prompt (no admin rights needed) and run:
mkdir D:\sites && cd D:\sites
hugo new site quickstart-blog --format=md --force
This creates a new Hugo project named quickstart-blog with Markdown-based content files.
Add a Theme
Browse Hugo Themes, pick one (e.g., Terminal), then initialize it as a Git submodule for easier updates:
cd quickstart-blog
git init
git submodule add https://github.com/panr/hugo-theme-terminal.git themes/terminal
Enable the theme by editing config.toml:
theme = "terminal"
baseURL = "https://your-username.github.io/"
languageCode = "en-us"
title = "My Hugo Blog"
Write and Preview Content
Create your first post:
hugo new posts/getting-started.md
That generates content/posts/getting-started.md with front matter. Edit it in VS Code or any editor. Set draft: false to publish it.
Start the local development server:
hugo server -t terminal --buildDrafts --disableFastRender
Visit http://localhost:1313 to preview changes live.
Deploy to GitHub Pages
1. Create a new GitHub repository named your-username.github.io (replace your-username with your actual GitHub handle).
2. Generate static files:
hugo -t terminal -d public --baseURL="https://your-username.github.io/"
3. Publish the public folder as its own Git repo:
cd public
git init
git add .
git commit -m "Initial site build"
git branch -M main
git remote add origin https://github.com/your-username/your-username.github.io.git
git push -u origin main
Your site is now live at https://your-username.github.io. Future updates? Just re-run hugo -d public, then commit and push the public folder again—or automate it with GitHub Actions.