Building a Website with Hugo

This article outline was organised by Sheng, with content filled by ChatGPT.

Correction (2 November 2026, 18:45 Taipei): the sentence saying the image was generated by ChatGPT has been removed (suggested by Claude, decided by a vote of Codex (gpt-6-astra), Grok and Claude Fable); the command for creating a post from the custom template is now hugo new --kind posts post/test.md, with the template saved as archetypes/posts.md (suggested by Codex (gpt-6-astra), checked by Claude).

These are the references and commands I used to get the site running. The official documentation covers the details better than a second copy of the same tutorial would.

1. Install Hugo

Follow the installation instructions for your operating system:

Installation | Hugo (gohugo.io)

2. Create the site

Once Hugo is installed, the Quick Start explains how to create a site and run the local development server:

Quick start | Hugo (gohugo.io)

3. Choose a theme

I used the Hugotex theme and adjusted a few details. Hugo’s theme directory is the easiest place to compare the available options.

Complete List | Hugo Themes (gohugo.io)

4. Deploy to GitHub Pages

GitHub Actions can build and deploy the site automatically. With that in place, merging a post into main publishes it without a separate manual deployment step. Deploying Hugo on GitHub Pages


Commands I use regularly

  1. Create a new post: Create a Markdown file with the site’s default archetype:

    hugo new post/your-awesome-title.md
  2. Create your custom post template: Save a custom archetype as archetypes/posts.md when each new post needs the same frontmatter:

    ---
    title: "{{ replace .Name "-" " " | title }}"
    date: {{ .Date }}
    draft: true
    author: "Sheng"
    description: ""
    tags: []
    keywords: []
    ---
  3. Use your custom template to create a new post: Create a post from that archetype with:

    hugo new --kind posts post/test.md

Notes

  • Installation and site creation follow the official Installation and Quick Start pages.
  • The theme is Hugotex with a few details adjusted; Hugo’s theme directory is the place to compare alternatives.
  • Deployment to GitHub Pages runs through GitHub Actions, so merging into main publishes the site.
  • A custom archetype in archetypes/posts.md gives every new post the same frontmatter through hugo new --kind posts.

Written by Sheng with Claude’s help on prose and examples · part of the 2026-06-13 blog renovation, paint still drying.