aboutsummaryrefslogtreecommitdiff
path: root/www-2/src/content.config.ts
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2026-01-23 23:16:45 +0800
committerYuqian Yang <crupest@crupest.life>2026-01-23 23:16:45 +0800
commit78e3e234877cb10ca1088df31e831b36fa4a12c0 (patch)
treea4b86275895b33d47df4686e5ce8f98b57016f90 /www-2/src/content.config.ts
parent3af5ef00b38c6962c6e3f63add0312fa6537b74b (diff)
downloadcrupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.tar.gz
crupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.tar.bz2
crupest-78e3e234877cb10ca1088df31e831b36fa4a12c0.zip
HALF WORK!
Diffstat (limited to 'www-2/src/content.config.ts')
-rw-r--r--www-2/src/content.config.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/www-2/src/content.config.ts b/www-2/src/content.config.ts
new file mode 100644
index 0000000..f309aa5
--- /dev/null
+++ b/www-2/src/content.config.ts
@@ -0,0 +1,17 @@
+import { defineCollection } from "astro:content";
+import { glob } from "astro/loaders";
+import { z } from "astro/zod";
+
+const blogs = defineCollection({
+ loader: glob({ pattern: "**/*.md", base: "./content" }),
+ schema: z.object({
+ title: z.string(),
+ description: z.string().optional(),
+ date: z.coerce.date(),
+ lastmod: z.coerce.date().optional(),
+ categories: z.string().optional(),
+ tags: z.array(z.string()).optional(),
+ }),
+});
+
+export const collections = { blogs };