upgrade to Astro 6 content collections (config.ts -> loader API)
This commit is contained in:
@@ -3,3 +3,6 @@
|
||||
{"t":0,"agent":"a7833f9","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
{"t":0,"agent":"a43d42e","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
{"t":0,"agent":"a4b63dd","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
{"t":0,"agent":"ab760b5","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
{"t":0,"agent":"a480718","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
{"t":0,"agent":"a462a28","agent_type":"unknown","event":"agent_stop","success":true}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"total_spawned": 0,
|
||||
"total_completed": 0,
|
||||
"total_failed": 0,
|
||||
"last_updated": "2026-04-27T13:00:32.726Z"
|
||||
"last_updated": "2026-04-27T13:31:47.934Z"
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import { defineCollection, z } from "astro:content"
|
||||
import { glob } from "astro/loaders"
|
||||
|
||||
const postCollection = defineCollection({
|
||||
type: "content",
|
||||
loader: glob({ pattern: "**/*.mdx", base: "./src/content/posts" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
@@ -11,7 +12,7 @@ const postCollection = defineCollection({
|
||||
})
|
||||
|
||||
const pageCollection = defineCollection({
|
||||
type: "content",
|
||||
loader: glob({ pattern: "**/*.mdx", base: "./src/content/pages" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
description: z.string().optional(),
|
||||
@@ -19,7 +20,7 @@ const pageCollection = defineCollection({
|
||||
})
|
||||
|
||||
const settingsCollection = defineCollection({
|
||||
type: "data",
|
||||
loader: glob({ pattern: "**/*.json", base: "./src/content/settings" }),
|
||||
schema: z.object({
|
||||
siteName: z.string(),
|
||||
siteDescription: z.string(),
|
||||
Reference in New Issue
Block a user