diff options
Diffstat (limited to 'src/content.config.ts')
| -rw-r--r-- | src/content.config.ts | 25 |
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 }; |
