Logo
astro-erudite主题使用
astro-erudite主题使用

astro-erudite主题使用

June 3, 2025
1 min read
1 subpost
index

感谢作者的贡献 jktrn/astro-erudite。对比了许多的主题,还是这个最符合口味。

创建博文

创建 /src/content/blog/标题/index.mdx 许多组件需要mdx,不需要组件正常写md内容也可以

子帖

index.mdx 同级目录下再创建一个 子帖标题.mdx,博文右边就会出现子帖。

子帖 跟博文属于同等级,frnotmatter也要写

frontmatter

必填只有三个标题、备注、日期

FieldType (Zod)RequirementsRequired
titlestringShould be ≤60 characters.Yes
descriptionstringShould be ≤155 characters.Yes
datecoerce.date()Must be in YYYY-MM-DD format.Yes
imageimage()Should be exactly 1200px × 630px.Optional
tagsstring[]Preferably use kebab-case for these.Optional
authorsstring[]If the author has a profile, use the id associated with their Markdown file in src/content/authors/ (e.g. if their file is named jane-doe.md, use jane-doe in the array).Optional
draftbooleanDefaults to false if not provided.Optional

标题

## 标题
### 二级标题
#### 三级标题

标注 Callout

需要 .mdx 并导入 import Callout from '@/components/Callout.astro'

Note (标注演示)

这里面可以是markdown语法

<Callout title="标注演示" variant="note">
这里面可以是`markdown语法`,
</Callout>

更多样式 v1.5.0: “A Callout Component for Nerds”

headless CMS

无头CMS基于Git管理的后胎CMS编辑,无需服务器。