Markdown Editor

Static Site Blog Post Template (Front Matter)

Blog post with YAML front matter (title, date, draft, tags, description, slug) and Hugo, Jekyll and Astro differences

글쓰기 및 콘텐츠경량Hugo, Jekyll and Astro front matter conventionsstaticsitepost

사용법: Use when writing a post for a static site generator. Fill the front matter first and keep draft true until ready. The main pitfall is generator-specific rules, such as Jekyll's dated file names or Astro's schema validation.

미리보기

title"[Post title]"
dateYYYY-MM-DD
drafttrue
tags["[tag-one]", "[tag-two]"]
description"[One-sentence summary under 160 characters for search results and social cards]"
slug"[post-slug]"

[Post title]

Blog post template for static site generators (Hugo, Jekyll, Astro and similar). It starts with YAML front matter, explains how the three generators differ, then gives a post body structure. Based on the documented conventions of each generator. Replace every [bracketed] value; delete the notes sections before publishing.

Front matter reference

The same fields, shown on their own so you can copy and adapt them:

---
title: "How we cut our build time in half"
date: 2026-10-21T09:00:00+07:00
draft: false
tags: ["ci", "performance", "github-actions"]
description: "Caching, parallel jobs and smaller images took our CI from 18 to 8 minutes."
slug: "cut-build-time-in-half"
---
FieldPurposeNotes
titlePage title and headingQuote it if it contains a colon
datePublication date for sorting and feedsFuture dates may be hidden until that date
draftExclude from production buildsRemove or set false to publish
tagsTaxonomy pages and related postsUse lowercase, hyphenated tags consistently
descriptionMeta description and social preview120 to 160 characters
slugURL segmentLowercase, hyphens, no dates unless your permalinks need them

Generator differences

TopicHugoJekyllAstro
Where posts livecontent/posts/ (or any section)_posts/src/content/blog/ with a content collection
File nameAny, for example my-post.md or a page bundle my-post/index.mdMust be YYYY-MM-DD-title.mdAny; the file name is the default ID or slug
Draftsdraft: true, shown with hugo server -DPut the file in _drafts/, or published: false; preview with --draftsNo built-in rule; filter draft yourself in the collection query
Front matter formatsYAML, TOML (+++) or JSONYAML onlyYAML; fields are validated by the collection schema
Slugslug overrides the file name in the URLslug used with the permalink pattern in _config.ymlSet via the collection loader or route; slug is a normal field you map
TagsBuilt-in taxonomies (tags, categories)tags and categories are built inDefine tags in the schema; build tag pages yourself
Summarydescription or summary, or text before <!--more-->excerpt or the first paragraphAny field you define, usually description

Post body

Introduction

[Two or three sentences: the problem or question, who it is for, and what the reader will get from the post.]

[Main section 1]

[Explain the first key point with an example, code block or image.]

[Main section 2]

[Second key point. Keep headings descriptive so readers can skim.]

[Main section 3]

[Third key point, or a step-by-step walkthrough.]

Conclusion

[Summarise the takeaway in two sentences and suggest one next step, such as a related post or a link to the code.]

Before publishing

  • draft set to false (Hugo, Astro) or file moved to _posts/ (Jekyll).
  • Images stored next to the post or in the static folder, with alt text.
  • The local preview build shows the post at the expected URL.
  • Description reads well as a search snippet.

Standard and licence note

Based on the documented front matter conventions of Hugo, Jekyll and Astro. Generator behaviour changes between versions; check your version's documentation. Original text written for this collection. Template licence: MIT.

관련 템플릿