feat: add FrontMatter CMS, biome, translation, etc.
* add Frontmatter CMS * add biome * update * update * fixed & add docs * fix translation.ts * fix translation
This commit is contained in:
42 files changed
+2714
-12795
No files matched your search
+13
-12
@@ -1,15 +1,16 @@
|
||||
import { z, defineCollection } from "astro:content";
|
||||
import { defineCollection, z } from 'astro:content'
|
||||
|
||||
const blogCollection = defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
published: z.date(),
|
||||
description: z.string().optional(),
|
||||
image: z.string().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
category: z.string().optional(),
|
||||
})
|
||||
const postsCollection = defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
published: z.date(),
|
||||
draft: z.boolean(),
|
||||
description: z.string().optional(),
|
||||
image: z.string().optional(),
|
||||
tags: z.array(z.string()).optional(),
|
||||
category: z.string().optional(),
|
||||
}),
|
||||
})
|
||||
export const collections = {
|
||||
'blog': blogCollection,
|
||||
}
|
||||
posts: postsCollection,
|
||||
}
|
||||
Reference in new issue
Block a user