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:
L4Ph authored and GitHub committed 2024-01-21 12:54:41 +08:00
1 parent f9a78b3e3b
commit 197d524b53
42 files changed
+2714 -12795

No files matched your search

+13 -12
View File
@@ -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,
}