From 9fe4480c3981c38ae8e24d0495df957039864a5d Mon Sep 17 00:00:00 2001 From: Dawid Rycerz Date: Tue, 13 Jan 2026 17:13:43 +0100 Subject: Remove micro and migrate to use only posts --- src/content.config.ts | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'src/content.config.ts') 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 }; -- cgit v1.2.3