content/posts/ directory. Each post lives in its own subdirectory with an index.md file.
Post structure
Hugo uses a specific directory structure for blog posts. Each post should be created as a subdirectory withincontent/posts/ containing an index.md file:
Creating a new post
Use a descriptive, URL-friendly slug for your directory name (lowercase, hyphens instead of spaces).
Open the
index.md file and add front matter at the top. Front matter uses TOML syntax enclosed in +++ markers:Example post
Here’s a real example from the benson.vc site:Draft vs. published posts
Control whether a post appears on your live site using thedraft field in front matter:
draft = false- Post is published and visibledraft = true- Post is hidden from production builds
hugo server -D, draft posts will be visible for preview.
Post URLs
Hugo generates URLs based on your directory structure. A post at:Including assets
Since each post has its own directory, you can include images and other files alongside your content:Common questions
Can I organize posts into categories or years?
Can I organize posts into categories or years?
Yes, you can create subdirectories within
content/posts/ to organize your content. However, the standard Congo theme structure uses a flat posts/ directory with each post in its own subdirectory. For taxonomies like categories and tags, use front matter fields instead of directory structure.What happens if I don't use a subdirectory?
What happens if I don't use a subdirectory?
While you can create posts as single
.md files directly in content/posts/, using subdirectories with index.md is the recommended approach. This is called a “page bundle” in Hugo and provides better organization and asset management.How do I change the post date format?
How do I change the post date format?
The date in front matter must follow RFC 3339 format with timezone information. Hugo will parse this date and you can format it in your templates using Hugo’s date formatting functions. The Congo theme handles date display automatically.
Can I write posts in formats other than Markdown?
Can I write posts in formats other than Markdown?
Hugo supports multiple content formats including Markdown, HTML, and AsciiDoc. However, Markdown is the recommended and most widely supported format for the Congo theme.