summaryrefslogtreecommitdiff
path: root/src/content.config.ts
diff options
context:
space:
mode:
authorDawid Rycerz <dawid@rycerz.xyz>2026-01-13 17:13:43 +0100
committerDawid Rycerz <dawid@rycerz.xyz>2026-01-13 17:20:15 +0100
commit9fe4480c3981c38ae8e24d0495df957039864a5d (patch)
treea5f3e4f8c0732c8cd934c28596c6a4d0ab38a4b4 /src/content.config.ts
parentc0dcecc43e36eeb6b10f662c1be760736cd0dbac (diff)
Remove micro and migrate to use only posts
Diffstat (limited to 'src/content.config.ts')
-rw-r--r--src/content.config.ts25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/content.config.ts b/src/content.config.ts
index a9fa0e2..5b5836b 100644
--- a/src/content.config.ts
+++ b/src/content.config.ts
@@ -35,10 +35,12 @@ const post = defineCollection({
.optional()
.transform((str) => (str ? new Date(str) : undefined)),
language: z.string().optional(),
+ sourceUrl: z.string().optional(),
+ author: z.string().optional(),
}),
});
-const micro = defineCollection({
+const pleroma = defineCollection({
loader: pleromaLoader({
instanceUrl: "https://social.craftknight.com",
username: "dawid",
@@ -51,23 +53,8 @@ const micro = defineCollection({
sourceUrl: z.string().optional(),
language: z.string().optional(),
tags: z.array(z.string()).default([]).transform(removeDupsAndLowerCase),
- author: z
- .object({
- username: z.string(),
- displayName: z.string().optional(),
- acct: z.string(),
- url: z.string().optional(),
- })
- .optional(),
- attachments: z
- .array(
- z.object({
- url: z.string(),
- type: z.string(),
- alt: z.string().optional(),
- }),
- )
- .optional(),
+ draft: z.boolean().default(false),
+ author: z.string().optional(),
}),
});
@@ -79,4 +66,4 @@ const tag = defineCollection({
}),
});
-export const collections = { post, tag, micro };
+export const collections = { post, tag, pleroma };