FangYuan 简明指南
254 字
1 分钟
FangYuan 简明指南
封面图来源:来源链接
这个博客模板基于 Astro 构建。指南里没有展开说明的部分,通常都可以在 Astro Docs 里找到答案。
文章 Frontmatter
---title: 我的第一篇博客文章published: 2026-01-12description: 这是我新的 Astro 博客中的第一篇文章。image: ./cover.jpgtags: [示例, 前端]category: 前端draft: false---| 字段 | 说明 |
|---|---|
title | 文章标题。 |
published | 文章发布时间。 |
description | 文章简介,会展示在列表页。 |
image | 文章封面图路径。 1. 以 http:// 或 https:// 开头:使用网络图片2. 以 / 开头:表示图片位于 public/ 目录3. 没有这些前缀:表示相对当前 Markdown 文件的路径 |
tags | 文章标签。 |
category | 文章分类。 |
draft | 是否为草稿。草稿文章不会展示给访客。 |
文章文件应该放在哪里
文章文件应该放在 src/content/posts/ 目录下。你也可以按需创建子目录,用来更好地组织文章和配套资源。
src/content/posts/├── post-1.md└── post-2/ ├── cover.png └── index.md