Skip to main content
  1. Posts/

Hugo Quickstart Guide

·329 words·2 mins·
Blog Author
Author
Blog Author
A bilingual blog built with Hugo and Blowfish.
Table of Contents

Hugo is one of the most popular open-source static site generators, known for its speed and simple deployment. This guide walks you through building and publishing your first Hugo site.

Installing Hugo
#

The installation method depends on your operating system:

  • macOS: brew install hugo
  • Ubuntu / Debian: sudo apt install hugo
  • Windows: use Chocolatey or Scoop: choco install hugo
  • Other platforms: download the corresponding binary from the Hugo Releases page

Verify the installation:

hugo version

Creating a new site
#

Use hugo new site to quickly scaffold a site skeleton:

hugo new site quickstart
cd quickstart

This generates the standard directory structure: content/, layouts/, static/, and more.

Adding a theme
#

A Hugo site needs a theme to render pages. Take Hextra as an example:

git init
git submodule add https://github.com/imfing/hextra.git themes/hextra

Then declare the theme in hugo.toml:

theme = 'hextra'

Writing your first post
#

Use hugo new to create a post, with front matter in TOML format:

hugo new posts/my-first-post.md

The front matter contains metadata such as date and title, while the body is written in Markdown, supporting code blocks, tables, images, and more:

+++
date = '2026-08-14T17:55:41+08:00'
draft = false
title = 'My First Post'
+++

## Introduction

This is **bold** text and this is *italic* text.

Local preview
#

Start the development server and Hugo will auto-refresh the page on file changes:

hugo server -D

Open http://localhost:1313 in your browser for a live preview.

Building and deploying
#

Before publishing, generate the static files:

hugo

The output goes to the public/ directory by default; host it on GitHub Pages, Netlify, or Vercel to go live.

Summary
#

StepCommand
Create sitehugo new site quickstart
Add themegit submodule add <theme-url>
New posthugo new posts/xxx.md
Local previewhugo server -D
Build & deployhugo

The Hugo ecosystem is mature and the community is active. Whether it is a personal blog or a documentation site, Hugo is a trustworthy choice. Try it out now!