The Problem
When adding new gotchas/posts to a Hugo site, it’s easy to forget required frontmatter fields or use inconsistent formatting.
The Solution
Hugo archetypes are template files that pre-populate frontmatter when you run hugo new. This site has one at archetypes/gotchas.md:
---
title: "{{ replace .Name \"-\" \" \" | title }}"
date: {{ .Date }}
tags: []
draft: false
---
## The Problem
Describe what you ran into...
## The Solution
What fixed it...
Now running:
hugo new gotchas/my-new-post.md
Generates a file with the correct structure, date auto-filled, and a consistent template to follow.
No more blank-page syndrome — just fill in the blanks.