209 字
1 分钟
中文博客使用指南

封面图片来源:查看原图
本站基于 Astro 构建。本文未涉及的内容,可以参考 Astro 文档。
文章 Frontmatter
---title: 我的第一篇博客published: 2023-09-09description: 这是我的第一篇 Astro 博客文章。image: ./cover.jpgtags: [示例, 前端]category: 前端draft: false---| 属性 | 说明 |
|---|---|
title | 文章标题。 |
published | 文章发布日期。 |
description | 文章简介,会显示在首页。 |
image | 文章封面路径:网络图片使用 http:// 或 https:// 开头;/ 开头表示 public 目录;其他情况相对于当前 Markdown 文件。 |
tags | 文章标签。 |
category | 文章分类。 |
draft | 是否为草稿;草稿不会对外展示。 |
文章文件放在哪里
文章文件应放在 src/content/posts/ 目录中。你也可以创建子目录,以便更好地组织文章和资源。
src/content/posts/├── post-1.md└── post-2/ ├── cover.png └── index.md