Minimal Markdown Post Template and YAML Front Matter for Blogs (Markdown 101 - Part 05)

// SERIES: Markdown 101 (10 lessons · Jump to any part)
  1. 01 Capstone Practice - Write a Complete Markdown Article from Scratch (Markdown 101 - Part 10)
  2. 02 How to Add Links and SEO-Friendly Images in Markdown (Markdown 101 - Part 04)
  3. 03 How to Create Tables and Horizontal Rules in Markdown (Markdown 101 - Part 07)
  4. 04 How to Preview and Publish Markdown Posts to Hugo on GitHub Pages (Markdown 101 - Part 06)
  5. 05 How to Use Obsidian Callouts and Wikilinks and Export Cleanly to Hugo (Markdown 101 - Part 09)
  6. 06 How to Write Checklists, Footnotes, and Escaped Characters in Markdown (Markdown 101 - Part 08)
  7. 07 How to Write Headings, Paragraphs, and Emphasis in Markdown (Markdown 101 - Part 02)
  8. 08 How to Write Lists, Blockquotes, and Code Blocks in Markdown (Markdown 101 - Part 03)
  9. 09 Minimal Markdown Post Template and YAML Front Matter for Blogs (Markdown 101 - Part 05)
  10. 10 What Is Markdown and How to Create Your First .md File (Markdown 101 - Part 01)

Markdown 101 · Part 5/10

A reliable Markdown post template needs only a direct opening answer, clear ## steps, a working example, and a YAML front matter block at the top so Hugo can build the page properly.

A Minimal Article Skeleton

Answer the reader's core question in 1–2 sentences.

## Steps

1. Complete the first step.
2. Verify the output.

## Example

Provide a concrete example readers can copy and test.

## Practice Now

Give one small exercise to apply the concept.

Focus each article on one search intent. When an example grows into a separate topic, split it into the next post in your series.

Understanding YAML Front Matter

Front matter is the metadata block placed between two --- lines at the very top of a Markdown file. Hugo reads it for the page title, meta description, publish date, taxonomy tags, and draft status.

In Dyn’s Obsidian vault, notes use Vietnamese property names that blog.py translates into standard Hugo front matter on publish:

Obsidian PropertyHugo FieldPurpose
Filename / titletitlePage title (H1)
Mô tảdescriptionMeta & social preview summary
SlugslugPermanent URL segment
Chuyên mục / Seriescategory / seriesSeries & archive grouping
Chủ đề / tagstagsTopic tags
Ngày xuất bảndatePublication date
Trạng tháidraftNháp → true, Đã đăng → false
Trạng thái: Nháp
Ngôn ngữ: en
Mô tả: "Create your first UTF-8 Markdown file and learn essential formatting."
Slug: "markdown-101-01-getting-started"

Writing Descriptions and Slugs for SEO

  • Meta description: Write a natural 120–160 character sentence stating what the reader will learn or achieve. Avoid stuffing keywords.
  • slug: Use lowercase ASCII words joined by hyphens (e.g., markdown-101-05-templates-and-yaml). Never change a slug after publishing unless you configure a redirect, or existing links will break.

Practice Now

Fill in a custom Mô tả and Slug below while keeping Trạng thái: Nháp.

Practice Now

Add a concise description and a hyphenated lowercase slug. Keep the post in draft status.

Live Preview
Show hint

Slugs should be lowercase ASCII with hyphens. YAML here is displayed as text only for practice.

Runs locally in your browser (nothing is uploaded or auto-saved). Supports headings, paragraphs, lists, checklists, tables, blockquotes, code, emphasis, links, and local site images.

Source: Hugo Content Formats & Front Matter.


In the Markdown 101 series:

Loading comments...