Create Your First Post
Option 1: Using Commands (Recommended)
# Create an English post
hugo new content post/my-first-post/index.en.md
# Create the corresponding Chinese version
hugo new content post/my-first-post/index.zh.md
Hugo will automatically populate initial content based on the archetypes/default.md template.
Option 2: Manual Creation
Create a new folder under content/post/, and then create index.en.md inside it:
content/
âââ post/
âââ my-first-post/ â Post directory (Name becomes the URL)
âââ index.en.md â English body
âââ index.zh.md â Chinese body (Optional)
âââ cover.jpg â Cover image (Optional)
Front Matter Explanation
The section between the --- at the top of each article is called Front Matter, used to define article metadata:
---
title: "Post Title"
description: "Post summary, displayed on the list page and in SEO descriptions"
date: 2026-04-12 # Publish date
lastmod: 2026-04-23 # Last modified date (optional)
draft: false # true = draft, will not be published
categories:
- Technology # Category (recommended to pick only one)
tags:
- Hugo # Tags (can have multiple)
- Markdown
image: cover.jpg # Cover image (relative to the post directory)
---
Tip: The
datedetermines the sort order of posts in lists. Posts with future dates requirehugo server -Fto be visible during local preview.
Basic Markdown Syntax
Headings
## Heading 2
### Heading 3
#### Heading 4
Avoid using Heading 1 (
# H1) in the article body because thetitlefield is already an H1.
Text Formatting
**Bold** Bold text
*Italic* Italic text
~~Strikethrough~~ Strikethrough
`Inline code` Code
Result: Bold, Italic, Strikethrough, Inline code
Links and Images
[Link text](https://example.com)
[Internal link](/post/hello-world/)
 # Relative path (same directory)
 # Absolute path (in static directory)
Lists
- Unordered list item
- Second item
- Nested item
1. Ordered list
2. Second item
3. Third item
Code Blocks
```python
def hello():
print("Hello, World!")
```
Supports syntax highlighting for: python, go, javascript, bash, toml, yaml, markdown, etc.
Blockquotes
> This is a blockquote.
> It can span multiple lines.
Result:
This is a blockquote.
Tables
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Content 1| Content 2| Content 3|
| Content 4| Content 5| Content 6|
Horizontal Rule
---
Multilingual Writing
This template has built-in support for Chinese and English.
File Naming Convention
| Filename | Language |
|---|---|
index.en.md | English |
index.zh.md | Chinese |
Place both files in the same directory, and Hugo will automatically link them as different language versions of the same post.
Writing Only in English
If you don’t want to write a Chinese version, just create index.en.md.
Adding a Chinese Version
- Create
index.zh.mdin the same directory. - Translate the article content (also translate
titleanddescriptionin the Front Matter). - Images and other resources are shared between both language versions; no need to duplicate them.
Example:
index.en.md:
---
title: "My First Post"
description: "This is my first blog post"
date: 2026-04-12
---
Content...
index.zh.md:
---
title: "æįįŽŽäļįŊæįŦ "
description: "čŋæŊæįįŽŽäļįŊååŪĒæįŦ "
date: 2026-04-12
---
å
åŪđ...
Inserting Images
Using Images from the Post Directory (Recommended)
Place the image in the post directory, and reference it using a relative path:
content/post/my-post/
âââ index.en.md
âââ cover.jpg â Cover image
âââ screenshot.png â Image inside the post
In Markdown:

Specify the cover image in the Front Matter:
image: cover.jpg
Using Images from the static Directory
Place the image in static/img/, and reference it using an absolute path:

Using Template Shortcodes
Title Divider
Suitable for separating paragraphs in diary-style posts:
{{< title "Morning Run" "green" >}}
Ran 5 km today, feeling great.
{{< title "Afternoon Reading" "blue" >}}
Read two chapters of "Deep Work".
Timeline
Suitable for showing experiences and growth trajectories:
{{< timeline >}}
{{< timeline-item date="2024-01" >}}
Started learning programming
{{< /timeline-item >}}
{{< timeline-item date="2024-06" >}}
Completed first project
{{< /timeline-item >}}
{{< /timeline >}}
Writing Tips
- The post directory name becomes the URL. It is recommended to use lowercase English letters and hyphens, like
my-first-post. - Cover images are recommended to be 1200Ã630px, which is the optimal size for social sharing.
- Keep the description under 160 characters for SEO friendliness.
- Use
hugo server -Dduring local preview to view draft posts.
Happy writing! âïļ