Getting Started with Hugo

A walkthrough for building your first Hugo site — from scaffolding to deployable output.

Hugo compiles Markdown content, templates, and static assets into a fully resolved HTML site in milliseconds. This post walks through the essential concepts so you can go from an empty directory to a working site in under ten minutes.

Install Hugo

Follow the official installation guide for your platform. Once installed, verify it is on your path:

hugo version

Scaffold a new site

hugo new site my-site
cd my-site

This creates the standard Hugo directory layout: content/, layouts/, assets/, static/, archetypes/, and a root hugo.toml.

Write your first page

hugo new about/index.md

Hugo uses the default archetype to populate front matter. Open the generated file, add some Markdown, and set draft: false.

Add a layout

Create layouts/_default/single.html:

{{ define "main" }}
<article>
  <h1>{{ .Title }}</h1>
  {{ .Content }}
</article>
{{ end }}

Run the development server

hugo serve

Open http://localhost:1313 — you should see your page with live reload.

Build for production

hugo

The public/ directory contains your deployable site. That is the full Hugo loop: write Markdown, create layouts, build static HTML.

Next steps

  • Add a base template (layouts/_default/baseof.html) to share structure across pages.
  • Create partials for reusable chunks like headers and footers.
  • Configure taxonomies (tags, categories) and add taxonomy templates.
  • Set up a CI pipeline that runs hugo and checks links.