# Building a Website with Hugo

> Notes on building a site with Hugo: install, Quick Start, Hugotex theme, GitHub Pages deployment via GitHub Actions, plus the archetype commands for new posts.

Source: https://sheng.page/en/posts/hugo-website-adventure/ · Published: 2024-09-10 · Author: Sheng

This article outline was organized by Sheng, with content filled by ChatGPT.  
Yes, you guessed it! Even the image was generated by ChatGPT.

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)](https://gohugo.io/installation/)

## 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)](https://gohugo.io/getting-started/quick-start/#explanation-of-commands)

## 3. Choose a theme

I used the [Hugotex theme](https://themes.gohugo.io/themes/hugotex/) and adjusted a few details. Hugo's theme directory is the easiest place to compare the available options.

[Complete List | Hugo Themes (gohugo.io)](https://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](https://gohugo.io/hosting-and-deployment/hosting-on-github/)

---

## Commands I use regularly

1. **Create a new post:**
   Create a Markdown file with the site's default archetype:
   ```bash
   hugo new post/your-awesome-title.md
   ```

2. **Create your custom post template:**
   Put a custom archetype in the `archetypes/` directory when each new post needs the same frontmatter:
   ```markdown
   ---
   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:
   ```bash
   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/` gives every new post the same frontmatter through `hugo new --kind`.

---

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