192 字
1 分钟
简单的主题配置指南
Cover image source: Source
博客主题构建使用 Astro. 这里就不做介绍,可以参考官方文档 Astro Docs.
博客文章的 Front-matter
---
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 | The title of the post. |
published | The date the post was published. |
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. |
draft | If this post is still a draft, which won’t be displayed. |
放置博客文章的位置
你的博客文章应该放置在 src/content/posts/ 目录. 你也可以创建一个子目录来组织你的博客文章和资源
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md
