209 字
1 分钟
帖子模板
Cover image source: Source
This blog template is built with Astro. For the things that are not mentioned in this guide, you may find the answers in the Astro Docs.
帖子示例
---
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
---
| 名称 | 描述 |
|---|---|
title | 帖子标题。 |
published | 帖子发布的日期。 |
description | 简要介绍一下帖子。显示在索引页。 |
image | 帖子的封面图像路径。 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 | 帖子标签。 |
category | 帖子的分类。 |
draft | 如果这篇帖子还是草稿,那就不会显示出来。 |
Post 文件的放置位置
你的帖子文件应该放在目录 src/content/posts/ 里。你还可以创建子目录,更好地组织帖子和资源。
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md


鲁公网安备号