
该博客模板基于 Astro 构建。对于本指南中未提及的内容,你可以在 Astro 文档 中找到答案。
文章的前置元数据
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---| 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. |
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
Your post files should be placed in src/content/posts/ directory. You can also create sub-directories to better organize your posts and assets.
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md
``
[1]: https://www.roysgensokyo.space/usr/uploads/2026/05/2042002764.png
评论