XPINE
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
---
属性描述
titleThe title of the post.
publishedThe date the post was published.
descriptionA short description of the post. Displayed on index page.
imageThe cover image path of the post.
1. Start with http:// or https://: Use web image
2. Start with /: For image in public dir
3. With none of the prefixes: Relative to the markdown file
tagsThe tags of the post.
categoryThe category of the post.
draftIf 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