Mirror of the sourcecode for my blog, original repo: https://github.com/NobbZ/blog-nobbz-dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// SPDX-FileCopyrightText: 2025 Norbert Melzer// SPDX-FileContributor: Norbert Melzer//// SPDX-License-Identifier: MIT
import { defineCollection, z } from "astro:content";
const catchall = z .object({ icon: z.string().url(), displayText: z.string(), href: z.string().url(), }) .partial({ icon: true });
const funding = z .object({ amazon: z.string().url(), github: z.string(), kofi: z.string(), patreon: z.string(), polar: z.string(), }) .catchall(catchall) .partial();
const social = z .object({ github: z.string(), gitlab: z.string(), linkedin: z.string(), twitter: z.string(), }) .catchall(catchall) .partial();
const web = z .object({ homepage: z.string().url(), }) .catchall(catchall) .partial();
const schema = z .object({ first_name: z.string(), last_name: z.string(), nick_name: z.string(), funding, social, web, }) .partial() .required({ nick_name: true });
export const authors = defineCollection({ type: "content", schema,});