Initial: pi-skill — 68 skills, 43 extensions, 11 themes for Pi
This commit is contained in:
34
skills/templates/astro-tina-starter/src/content/config.ts
Normal file
34
skills/templates/astro-tina-starter/src/content/config.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { defineCollection, z } from "astro:content"
|
||||
|
||||
const postCollection = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
publishedAt: z.date().optional(),
|
||||
category: z.enum(["news", "blog", "tutorial"]).optional(),
|
||||
}),
|
||||
})
|
||||
|
||||
const pageCollection = defineCollection({
|
||||
type: "content",
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
}),
|
||||
})
|
||||
|
||||
const settingsCollection = defineCollection({
|
||||
type: "data",
|
||||
schema: z.object({
|
||||
siteName: z.string(),
|
||||
siteDescription: z.string(),
|
||||
language: z.enum(["th", "en", "th-en"]).default("th"),
|
||||
}),
|
||||
})
|
||||
|
||||
export const collections = {
|
||||
posts: postCollection,
|
||||
pages: pageCollection,
|
||||
settings: settingsCollection,
|
||||
}
|
||||
Reference in New Issue
Block a user