201 words
1 minute
Writing a Blog Post
This blog template is built with Astro. This article is a small, generic example of the file structure and common frontmatter used by a post. The complete current schema and Markdown syntax are maintained in the Content Authoring Guide.
Common frontmatter
---title: "An Example Article"published: 2026-08-01updated: 2026-08-08description: "A short summary for previews."image: ./cover.webptags: [Example, Guide]category: Guidesdraft: falsecomment: true---| Attribute | Description |
|---|---|
title | The title of the post. |
published | The date the post was published. |
pinned | Whether this post is pinned to the top of the post list. |
priority | The priority of the pinned post. Smaller value means higher priority (0, 1, 2…). |
description | A short description of the post. Displayed on index page. |
image | The cover image path of the post. 1. Start with http:// or https://: Use web image2. Start with /: For image in public dir3. With none of the prefixes: Relative to the markdown file |
tags | The tags of the post. |
category | The category of the post. |
licenseName | The license name for the post content. |
author | The author of the post. |
sourceLink | The source link or reference for the post content. |
draft | If this post is still a draft, which won’t be displayed. |
Where to Place the Post Files
Place post files in src/content/posts/. You can create sub-directories to organize articles and their local assets.
src/content/posts/├── example.md└── guides/ ├── cover.webp └── index.mdRelative images such as ./cover.webp are resolved from the current article file.
Share
If this article helped you, please share it with others!
Writing a Blog Post
https://mizuki.mysqil.com/posts/guide/ Some information may be outdated
Related Posts Smart
1
MDX Syntax Guide
Guides Learn how to combine Markdown, components, JavaScript expressions, callouts, Wiki Links, math, code groups, and images in an MDX article.
2
Include Video in the Posts
Examples This post demonstrates how to include embedded video in a blog post.
3
图片画廊网格:语法与完整示例
示例 一份关于图片画廊网格的语法、参数、裁剪、响应式行为、图注与灯箱导航的完整指南。
4
Markdown 与 Mermaid 图表
示例 一篇包含 Mermaid 图表的 Markdown 博客文章简单示例。
5
Markdown 教程
示例 一个 Markdown 博客文章的简单示例。